Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #23012

    Hi Guys,

    One small thing, I followed this thread.. [ http://www.kriesi.at/support/topic/view-portfolio-entries-based-on-tags ] to get the tags working on Portfolio entries, the code Nick provided is fine and I’m able to add tags in the backend to portfolio items, However, I cannot get them displayed on the front end.

    I’ve followed the WP codex and added the following code:

    <?php the_tags(‘<span>Tags: </span>’,’ • ‘,’
    ‘); ?>

    And they’re not showing up, I’ve also tried following this thread [ http://www.kriesi.at/support/topic/add-tags-for-portfolio-posts ] and nothing yet.

    Can you please advice how to get the Portfolio Tags displayed on the front end using the code Nick provided?

    Cheers,

    -A

    #118229

    Open up wp-contentthemesangularincludesloop-portfolio-single.php and replace

    the_content(__('Read more  →','avia_framework'));

    with

    the_content(__('Read more  →','avia_framework'));
    the_tags('<strong>'.__('Tags:','avia_framework').'</strong><span> ');

    This will add the tags to the single portfolio entry page. If you want to use the ajax portfolio modify wp-contentthemesangularincludeshelper-templates.php instead.

    #118230

    Thanks Dude,

    But it seems the tags still not appear, let me clarify – there were several posts on this topic in the forum that I was able to get them displayed but when the tags were clicked they returned 404 page not found error, then Nick provided the a code that will set the portfolio tags apart from the default wp posts tags, the other member i assume got it working..

    Are you sure this should work with Nick’s code? [ http://www.kriesi.at/support/topic/view-portfolio-entries-based-on-tags ] (you can see it at the bottom)

    Sorry, I just cant see them, though I did add tags and i can clearly see them in the backend

    Thanks again,

    -A

    #118231

    Can we view a portfolio item on your site live? That is the default wordpress code for spitting out the tags. If its in an ajax portfolio (where the portfolio item opens on the same page) you’ll need to do as Dude said and add the above code to your helper-templates.php file as well as the single portfolio loop.

    Regards,

    Devin

    #118232

    Hi Devin,

    Sure, but warning you buddy as the site is in Hebrew and is fully loaded – It’s almost a year since we started getting it up and running fast and now there no turning back so we have to continue work with the theme, back then the Angular was one of the first themes that offered responsive design + the drag&drop template builder which was (and still) a big plus for us – obviously now there are other frameworks that will more suite for the job – but for now we’ll have to settle for this one.

    Anyhow here is the link, and I added some txt where i pasted the code provided..

    http://www.theterminal.co.il/packages/בורי-ראסה-קופנגן-buri-rasa-koh-phangan/

    Also, I’ve just added the Facebook comments plugin and activated the comments for single-portfolio and for some reason the comments are being duplicated at the bottom of the page, any ideas on that? though i think it’s related to ACF(advanced custom fields) plugin that is being used on single-portfolio..

    Many Thanks,

    -A

    #118233

    I just noticed that Nicks code registers a new taxonomy and this taxonomy won’t work with the_tags(). You need to use the standard “post_tag” taxonomy instead. Open up wp-contentthemesangularincludesadminregister-portfolio.php and replace:

    $args = array(
    'labels' => $labels,
    'public' => true,
    'show_ui' => true,
    'capability_type' => 'post',
    'hierarchical' => false,
    'rewrite' => array('slug'=>$slugRule,'with_front'=>true),
    'query_var' => true,
    'show_in_nav_menus'=> false,
    'supports' => array('title','thumbnail','excerpt','editor','comments')
    );

    with

    $args = array(
    'labels' => $labels,
    'public' => true,
    'show_ui' => true,
    'capability_type' => 'post',
    'hierarchical' => false,
    'rewrite' => array('slug'=>$slugRule,'with_front'=>true),
    'query_var' => true,
    'taxonomies' => array('post_tag'),
    'show_in_nav_menus'=> false,
    'supports' => array('title','thumbnail','excerpt','editor','comments')
    );

    #118234

    Thanks Dude,

    but still after replacing the code above with the one i had (which was the same) still not showing the tags on the page.

    If you mean that i should NOT use Nick’s “Portfolio Tags” code which created another Portfolio ‘Meta Box’ in the portfolio WP editor and just use the standard Tags meta box then the tags are indeed are shown and displayed in the front end, however clicking on any of them returns “Nothing found” – “message and that their are no posts matched your criteria” as you can see over here:

    http://www.theterminal.co.il/packages/טיול-גיפים-בצפון-תאילנד-רד-בריק-red-brick/ (you can see the tags shown below)

    Please help..

    Cheers,

    -A

    #118235

    That’s a problem of the wp query: http://wordpress.org/support/topic/custom-post-type-tagscategories-archive-page – use following code (insert it at the bottom of functions.php) to fix it:

    if(!function_exists('avia_fix_tag_archive_page'))
    {
    function avia_fix_tag_archive_page($query) {
    $post_types = get_post_types();
    if ( is_category() || is_tag()) {

    $post_type = get_query_var(get_post_type());

    if ($post_type) {
    $post_type = $post_type;
    } else {
    $post_type = $post_types;
    }
    $query->set('post_type', $post_type);

    return $query;
    }
    }
    add_filter('pre_get_posts', 'avia_fix_tag_archive_page');
    }

    #118236

    Related question about the tags, or faceted navigation of portfolio items. My portfolio currently has 43 items, which means the portfolio items are displayed on three pages (pagination of pages with portfolio items). For a long time I could not figure out why the tags were not working, but today I figured out the issue. At least on my site, the tags/faceted navigation only work with the portfolio items on the current page loaded in the browser, but not the other portfolio items on the other pages.

    The first page of portfolio items loads by default. If someone clicks on a tag, depending on the tag, it may appear that I have no projects for that tag, when I do, but they are on the other pages. Potential employers & clients might not go further than just clicking on the tag on the first page. It would be fantastic if a user could click on a tag, and have all of the matching portfolio items be listed, not just those on the current page loaded in the browser.

    How can I get the tags to work with all of the portfolio items, and not just those shown on a single page?

    #118237

    Thanks Dude for your efforts, appreciated! this works just fine…

    I guess I should ignore the other Portfolio Meta Box that Nick’s code registered, and use the standard wp tags? I’m not really interested to use the blog or blog posts so there is no need really to have separate tags for each post type.

    Thanks again..

    -A

    #118238

    Hey!

    Yes, I’d just use the standard post_tag taxonomy – especially because third party plugins (tag clouds, etc.) also support it and it’s always difficult to work with custom post types/taxonomies.

    Regards,

    Peter

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

The topic ‘PORTFOLIO TAGS’ is closed to new replies.