Site icon Hip-Hop Website Design and Development

Any concepts on why after I put an inventory of class hyperlinks in a dropdown listing utilizing <choose><possibility> tags the hyperlinks are going to the improper url?

Desktop model is offering the right url for instance: http://take a look at.native/take a look at/class/featured/ however the cellular model just isn’t offering the right url: http://take a look at.native/take a look at/featured/ it is dropping the /class/

Right here is my desktop model of code:

<div class="category-filter full">
        <span class="filter-text"><i class="far fa-filter"></i> <?php esc_html_e( 'Filter by:', 'test-wp' ); ?></span>
        <ul class="category-list">
            <?php 
            // solely show "Featured" if a Featured put up is current within the weblog
                $question = new WP_Query(array(
                    'post_type' => 'put up',
                    'subject' => 'slug',
                    'category_name' => 'featured',
                    'ignore_sticky_posts'    => 1,
                ));
                if( $query->have_posts() ){
                    echo '<li><a href="'. get_site_url() .'/category/featured/">Featured</a></li>';
                }
            wp_reset_postdata(); // Restore authentic Publish Knowledge
            ?>
            <?php 
                foreach ( $phrases as $time period ) {
                    printf( '<li><a href="%1$s">%2$s</a></li>',
                        esc_url( get_category_link( $term->term_id ) ),
                        esc_html( $term->identify )
                    );
                }
            ?>
        </ul>
    </div>

And right here is my cellular model of code:

<div class="category-filter mobile">
        <choose id="custom-select" onchange="location = this.value;" model="outline:none;border:1px solid #777;font-size:20px;height:30px;color:#777;">
            <?php 
                foreach ( $phrases as $time period ) {
                    printf( '<possibility><a href="%1$s">%2$s</a></possibility>',
                        esc_url( get_category_link( $term->term_id ) ),
                        esc_html( $term->identify )
                    );
                }
            ?>
        </choose>
    </div>