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

    Hi everyone,

    I have a problem with my site, I added tags to portfolio according to the instructions of Dude, the problem lies in finding the elements portfolio by clicking on the tag. I’ll show it on example:

    http://projekt.i-pd.pl/tag/mala-architektura-2/

    when you go to this page you will see “Nothing was found”, but portfolio items has tag “mała architektura”.

    I have no idea how to resolve this problem, also I added new taxonomy in according to Nick instructions but that doesn’t work either.

    Anybody has ideas how to fix it? Where is the problem? :(

    #110549

    Hi mir26kra,

    You may just need to refresh you permalinks. Try going to the WordPress Settings>Permalinks and setting the option to Default. Then save and check the tag archive again.

    If it works, go back and change it to Post name again, save and check it again.

    Regards,

    Devin

    #110550

    Hi Devin,

    thanks for reply, I tried it and it doesn’t work, my friend also told me to delete the .htaccess but that doesn’t work either.

    #110551

    I think the problem is that wordpress doesn’t support custom post types on tag archive pages by default – see http://wordpress.org/support/topic/custom-post-type-tagscategories-archive-page

    - try to add following code to the very bottom of functions.php:

    add_filter('pre_get_posts', 'query_post_type');
    function query_post_type($query) {
    if(is_category() || is_tag()) {
    $post_type = get_query_var('post_type');
    if($post_type)
    $post_type = $post_type;
    else
    $post_type = array('post','portfolio');
    $query->set('post_type',$post_type);
    return $query;
    }
    }

    #110552

    Hi Dude,

    thank you for your help, it works :)

    Regards

    Mirek

    #110553

    Hey!

    Great, glad that I could help you :)

    Best regards,

    Peter

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

The topic ‘Problem with listing portfolio items on archive page’ is closed to new replies.