Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #16539

    Is there any way to control the links that show up under the page title in a single portfolio view. For example, on the left side of this page, under the product name there are 2 category links – “in Business Growth, Spotlights & Specials” :

    http://landlordsource.com/product/the-practical-guide-to-buying-and-selling-property-management/

    These links are created automatically and link to an archive page that I can’t seem to control. I would prefer they go back to the page the person came from before hitting this page or to the category pages I created. It looks like I can remove them completely and that’s what I’ll do iv there is not a better option I would prefer to link to somewhere thought.

    Thanks,

    #91913

    Hi,

    Do you have a lot of portfolio categories? If not maybe this simple solution may help. Open loop-single-portfolio.php and find this code

    $portfolio_cats = get_the_term_list(  get_the_ID(), 'portfolio_entries', '', ', ','');

    if($portfolio_cats && !is_object($portfolio_cats))
    {
    echo '<span class="portfolio-categories minor-meta">'.__('in ','avia_framework');
    echo $portfolio_cats;
    echo ' </span><span class="text-sep">/</span> ';
    }

    Replace it with this

    echo '<span class="portfolio-categories minor-meta">'.__('in ','avia_framework');
    if(term_exists('Business Growth Products', 'portfolio_entries')) {
    echo "<a href='http://landlordsource.com/policy-and-procedures-manuals/'>Business Growth Products</a>";
    };
    echo ' </span><span class="text-sep">/</span> ';

    I think this is not a very good solution so I suggest you check some wordpress conditionals on the codex reference.

    Regards,

    Ismael

    #91914

    Ismael – I’m a little hesitant to try this cause I’m not really a coder ;-) I just follow instructions well. Can you just tell me how to remove those category links completely?

    Thanks!

    #91915

    Hi!

    Open up propulsion/includes/loop-portfolio.php and delete following line:

    $categories = get_categories($args);

    Regards,

    Peter

    #91916

    That did not achieve what I’m looking for. I want to remove the “in” category links (Or better yet just hard code a “back” link / button) in the area I’ve outlined in Red on this screenshot.

    http://lsnewsletters.com/screenshots/Propulsion4.jpg

    I just ended up removing this part of the code from loop-portfolio-single.php – let me know if anyone thinks of a good way to integrate a category link that goes to the page I set up instead of the archived page. I may test Ismael’s suggestion too.

    <?php

    $portfolio_cats = get_the_term_list( get_the_ID(), ‘portfolio_entries’, ”, ‘, ‘,”);

    if($portfolio_cats && !is_object($portfolio_cats))

    {

    echo ‘<span class=”portfolio-categories minor-meta”>’.__(‘in ‘,’avia_framework’);

    echo $portfolio_cats;

    echo ‘ </span><span class=”text-sep”>/</span> ‘;

    }

    /*

    echo ‘<span class=”blog-author minor-meta”>’.__(‘by ‘,’avia_framework’);

    the_author_posts_link();

    echo ‘</span>';

    */

    ?>

    #91917

    Hi!

    Glad that you found a solution. Thread closed.

    Regards,

    Peter

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

The topic ‘Category Links in Single Portfolio View’ is closed to new replies.