an
Wait a minute... This content is very very old. We no longer sell or support this theme version. New Topics
  • Version 9
    James SalaƱo Regaldie
    0 points
    Beginner

    Finally I can solve,

    Point 2 is because search bar on taxonomy page dont send the catid, I modify as show line 119: search-bar.php
    Old line
    <?php if(!isset($_GET[‘catid’])){ $selcat = “”; }else{ $selcat = $_GET[‘catid’]; } echo $CORE->CategoryList(array($selcat,false,0,THEME_TAXONOMY)); ?>
    New line:
    <?php if(!isset($_GET[‘catid’])){ $selcat = “”; } else { $selcat = $_GET[‘catid’]; } if (is_tax()){ $selcat = get_queried_object_id(); } echo $CORE->CategoryList(array($selcat,false,0,THEME_TAXONOMY)); ?>

    In this way, search form show current category as selected, and when someone try to order or filter, only show products on current page

    and point 1, for default search, i modify search-results.php after before hook to force my order in a taxonomy pages:

    if(is_tax()) {
    global $wp_query;
    if ($post->post_type == ‘listing_type’){
    $custom_query_args = array(
    ‘meta_key’ => ‘price’,
    ‘orderby’ => ‘meta_value_num’,
    ‘order’ => ‘asc’
    );
    $args = array_merge( $wp_query->query, $custom_query_args );

    query_posts( $args );
    }
    }

    Thanks a lot mark, but solved for me. I show this changes because maybe are intersting for your next releases.

    October 7, 2018 at 3:45 pm

923

Views

15

Replies