Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #386656

    mateoserendipia
    Participant

    Hi People,

    I have this setup:

      – My home page is a portfolio index page showing thumbnails that link to project pages (instead of linking to the portfolio post)
      – The project pages are also portfolio index pages, and here each portfolio thumbnail opens the image in lightbox (again instead of linking to the portfolio post).
      – The images are selected for each project portfolio according to their categories.
      – The portfolio posts contain a title and some textual content that is shown in the index page below the thumbnail

    So basically the collection of portfolio posts is just there to populate the various portfolio indexes, and are not meant to be opened as an individual post page (if you get my drift…). This works beautifully and I’m very happy with it.

    But today it struck me that search engines will likely crawl all the portfolio posts (and they should, because h1 headings and content are in there), and will then link to those individual portfolio posts. The latter I don’t want; I want the visitor to end up at the relevant project portfolio page.

    So now i’m wondering how to deal with this. I can setup a 302 redirect from each portfolio post to the project portfolio (I found and tested a plugin that does that ) – but I was wondering if i’m missing a more obvious (and perhaps more elegant) solution for this situation.

    I’m not even sure whether this is a X-theme question, and if it’s not, my apologies, then i’ll try to find an answer elsewhere. (or maybe there is a member reading along that would have a suggestion).

    Thanks!
    Mateo

    #386672

    Christopher
    Moderator
    This reply has been marked as private.
    #386742

    mateoserendipia
    Participant
    This reply has been marked as private.
    #386945

    Rad
    Moderator

    Hi there,

    All method works perfectly, I’m not sure what external linking you’re referring. But as I understand correctly, SEO could still see your normal post type (portfolio) right? In that case, you should install a SEO plugin that allows you to setup noindex and nofollow for specific post types. One example is https://wordpress.org/plugins/wordpress-seo/

    Or you may add this code at your child theme’s functions.php

    add_action('wp_head','no_index_no_follow');
    function no_index_no_follow () { 
    if ( is_singular('x-portfolio') ) echo '<meta name="robots" content="noindex, nofollow" />';
    }

    Thanks.

    #387112

    mateoserendipia
    Participant

    Hi,

    Thanks a lot for the answer! However, this solution will hide my portfolio posts from the search engines alltogether, and that was not what I meant.

    All relevant content (images and text such as project titles) will be in portfolio items (posts). So search engines should index this content.

    But in my site I’m showing the visitors this content in portfolio index pages only (see the example project pages in my site), and don’t show them the individual portfolio posts. So I don’t want a visitor to arrive at such a individual portfolio post via a search engine either. Visitors should always see portfolio index pages only.

    A 302 redirect from each portfolio item (post) to the relevant project page fixes this, but that means I will include over a hundred redirects in the site (one for every portfolio item), and i’m not sure if this is a correct way of solving this. So I was wondering if i’m missing a more easy solution.

    Thanks!

    #387522

    Lely
    Moderator

    Hello Mateo,

    Thanks for the clarification! Regretfully, this particular request is outside the scope of our support as this is not related to an issue with the theme and instead has to do with your customization of it and SEO linking. As such, you will need to investigate this particular issue on your own or seek help from a developer should you not feel comfortable making these changes yourself. If you have any further questions about the theme, we are more than happy to provide you with assistance on these inquiries.

    Thank you for your understanding.

    #387531

    mateoserendipia
    Participant

    Ok, fair enough, I understand – Thanks anyway!

    Mateo

    #387670

    Lely
    Moderator

    You’re welcome!