Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #18398

    I am trying to setup multiple portfolios that contain the same name category (display when sorting… i.e “Best Sellers”) but a separate “Best Sellers” category in each portfolio.

    SO… when choosing which categories to pull from in the theme settings while setting up portfolios… as well as assigning posts to portfolio categories (check boxes on the right when creating a post)… how can I get these to display the category slugs instead of the names… even though the names will show up when sorting these portfolios in the front end?

    Thanks…

    #99306

    And BTW… Names AND slugs would do the trick as well…

    #99307

    Open up includes/loop-portfolio.php and search for following line:

    $output .= "class='".$category->category_nicename."_sort_button' >".$category->cat_name."</a>";

    You can replace $category->cat_name with eg the slug or the category nicename – if you i.e. want to use the slug then replace it with: $category->slug .

    #99308

    Thanks. Not working though. This changed them on the front end. The opposite of what I’m trying to achieve. I want the regular names on the front end, but the slugs on the back end. Is this a different PHP file?

    Thanks again…

    #99309

    Hey!

    I’m not sure how to do this but can I ask what advantages can you get from displaying the category aliases rather than the actual name?

    Regards,

    Ismael

    #99310

    Yes… so I can have unique portfolios that each contain their own “Best Sellers” category… the way I’ll tell them apart, and assign portfolio items to them in the back end, is seeing their slugs. Cause otherwise they’ll all say “Best Sellers” and I won ;t be able to tell which is which.

    Brilliant?

    #99311

    Hi!

    In this case you can try to replace all occurences of $category->category_nicename in loop-portfolio.php with $category->slug. I’m not sure if this will work though…

    Regards,

    Peter

    #99312

    We solved this by appending a ‘sub-cat’ to the term name and then stripping out the sub in the display template.

    So Best Sellers-dogs and Best Sellers-birds appear in wp-admin, but the public pages all show just ‘Best Sellers’.

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

The topic ‘Can I somehow display portfolio category ALIASES in the setup instead of name?’ is closed to new replies.