Viewing 6 posts - 1 through 6 (of 6 total)
  • Posted in: Dante
  • #54021
    tonipavlovic
    Member
    Post count: 52

    Hi,

    How can one change the “PRODUCTS” slug which appears for the portfolio items in the search results (see attachment)?

    Also, is it possible to exclude the galleries from the search results?

    Thank you in advance for your help,
    Antonio

    #54068
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Hi there,

    Thanks for letting us know about that. To fix the post type heading, please edit /includes/swift-framework/sf-content-display/sf-header.php line 932-936 with:

    if(isset($post_type[$key]->labels->name)) {
    	$search_results_ouput .= "<h6>".$post_type[$key]->labels->name."</h6>";
    } else if(isset($key)) {
    	$search_results_ouput .= "<h6>".$key."</h6>";
    } else {
    	$search_results_ouput .= "<h6>".__("Other", "swiftframework")."</h6>";			        
    }

    For the post type, you’d need to edit line 904:

    'post_type' => 'any',

    changing it to an array of each post type to search:

    'post_type' => array('post', 'page', 'product', 'portfolio'),

    – Ed

    #54085
    tonipavlovic
    Member
    Post count: 52

    Hi Ed,

    I am a bit confused… firstly, the sf-header.php file is only located in the /includes folder and not in the path you mentioned (/includes/swift-framework/sf-content-display/sf-header.php) which I don’t appear to have at all.

    Secondly, I have included screenshots of the lines you mentioned which in my case do not correspond with the ones you described.

    I am looking at the right file?

    Antonio

    #54264
    Melanie – SUPPORT
    Member
    Post count: 11032

    Hey, in the sf-header.php, can you look around the lines Ed mentioned? Maybe they are not the same in your installation but further above or below.

    That probably depends on the theme version you’re using.

    #54312
    tonipavlovic
    Member
    Post count: 52

    Hi Melanie,

    That worked, should have thought to search myself but was put off by the path which is different.

    By the way, can I also change the “posts” slug that is shown in the results (see attached) to “news”?

    Thanks in advance,
    Antonio

    edit: wrong attachment

    #54548
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Sorry it’s not unfortunately, as it uses the post type for e.g. ‘post’, ‘portfolio’ etc. And the post type is post.

    – Kyle

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register