Portfolio Press
Tags cloud in sidebar (8 posts)

  1. gastonq05
    Posted 5 years ago #

    Hi, firs of all, congrats for your work, it's a great template.

    Question, is it possible to use the Portfolio's Tag cloud in the sidebar of the Wordpres?




  2. yodiyo
    Posted 4 years ago #

    It would be great to know this too. It's a nice theme but it would be great to be able to use the tags. Any clues? Thanks.

  3. gregortraugott
    Posted 4 years ago #

    I have the same question. A short example would be great! Thanx

  4. Phaethon2011
    Posted 4 years ago #


  5. Andrei Olsen
    Posted 4 years ago #

    Just go to Appearance -> Widgets, drag-and-drop Tag Cloud from Available widgets to Sidebar and that's it.


    Or am I missing something here?

  6. Phaethon2011
    Posted 4 years ago #

    Thanks AO, I, and I'm sure others, have tried that but the tag cloud widget comes up empty. This, I believe, is because we are using tags in portfolio items, not ordinary posts or pages.

    When creating or editing a portfolio item a tag cloud of portfolio item tags can be viewed in the tag area of the edit page, so the information is available, just not in a widget as far as I can see.

    I'm guessing the query that returns tags from posts needs to be expanded to include portfolios in portfolio-enabled themes/plugins.

  7. Andrei Olsen
    Posted 4 years ago #

    Oh, I see. You guys are using custom post types plugin for this theme.

    Here's a quick and dirty tag cloud widget, add the following to the functions.php (afterwords drag-and-drop new 'Portfolio Tag Cloud' widget as explained above):

    function portfolio_tags_widget_display($args) {
        echo $before_widget;
        echo $before_title . __('Tags') . $after_title;
        echo $after_widget;
        'Portfolio Tag Cloud',
        array('description' => 'Your most used portfolio tags in cloud format')

    It's also possible to add post tags to the cloud. Change wp_tag_cloud line above with this one:

    wp_tag_cloud(array('taxonomy' => array('portfolio_tag','post_tag')));

    Take a look here if you need to add more parameters:

  8. Phaethon2011
    Posted 4 years ago #

    Thanks for the fix Andrei it worked (eventually).

    I'm not sure what I did first time around, but when I pasted your code into (a) functions.php it broke the entire site - couldn't figure out what was wrong so I put the tag-cloud problem aside while I tweaked some other features and built content - hence the delay.

    When I returned to the tag-cloud issue I did what I thought I'd done before, but this time it worked a treat. Not sure what I screwed-up the first time but I pasted your code just after the function portfoliopress_update_portfolio_tags in the file:


    (that, AFAICT, is the latest version of the theme from the author's GitHub distribution)

    Anyway Andrei, thanks again for the tip.

  9. Phaethon2011
    Posted 4 years ago #

    Duplicate Post

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic