We're merging with GenerateBlocks! Learn more here.

[Resolved] Posts sent to all categories appear on one but appear to link to another

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support Posts sent to all categories appear on one but appear to link to another

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #21088
    Simon
    Participant

    Hi Tom and team.

    Sorry – my title doesn’t explain this well.

    The website has a page for each regional hub.

    Each regional hub has its own Posts category. Each page includes its own unique WP Show Posts list, set to show only posts in that one category.

    Each region is identified by a GeneratePress Hero header, that appears correctly above its page, as well as above its post category, post archive, and bb forum.

    So… Posts posted just on London region category, appear on just the London region page, etc. Correct.
    Posts posted to all regions, appear on all the regions’s pages. Correct.
    When clicked, a post sent only to the London region appears with the London region Hero above. Correct.

    However… When you are on the London page, and click on a displayed post that was sent to all regions, it takes you to the correct post, but with the Scotland Hero above it. (If I remove the Scotland category from the post, it just takes me off to another region.)

    There is nothing I can see in the code to take you to the Scotland hub or trigger that Hero, or take you out of the London region post category. (Within the WP Show Posts listingEach article/post sent to all regions has all regional categories listed equally as classes for the article.wp-show-posts-single. The link url from the listing to the post doesn’t include the category, just the site and the post name. I created the Scotland hub first, so that may be a reason, but it doesn’t help solve the problem.)

    I guess I want a post that is sent to, and displayed in, a particular category list to behave as part of that list. Is that possible?

    Hope I’ve explained it… Help urgently needed, as I’m not sure what to do if this doesn’t work. I need posts sent to all hubs to appear in all hubs, and be viewed in those hubs.

    I can’t see how to send you the link and pw for the site on this forum, but could do.

    Best wishes
    Simon

    #21171
    Tom
    Keymaster

    Hi Simon,

    So is this an issue with the Header Element in GeneratePress? If so, have you opened a topic over there yet?: https://generatepress.com/support

    This doesn’t sound like it’s a WPSP thing.

    Let me know 🙂

    #21215
    Simon
    Participant

    Hi Tom

    I think it is a WPSP thing. I brought in an independent arbiter – ‘same-category-posts’ plugin – to see what category a post thinks it is in!

    As I said, if I post a post on two hubs (ie with 2 post categories), and then go to one of the hubs (ie a page with a WPSP shortcode for one category), and I click on that post to open it, when the post displays it often displays with the wrong hero image.

    Interestingly the ‘same-category-posts’ list in the sidebar alongside the post, offers posts from both categories.

    That suggests when a post is displayed, it doesn’t remember which category or shortcode it was triggered by / linked from. Hence I get either Hero image. (The heros are each set for the one page and category.)

    Is there a way of getting a post to keep some record of the shortcode / category that it was triggered by / linked from?

    (Thinking about it, I could add a CSS class in each WP Show Posts listing, but… then that post will still have both classes.)

    Any suggestions?
    Thank you
    Simon

    #21232
    Tom
    Keymaster

    Show Posts has no control over the single posts – it simply queries a list of posts based on your settings.

    If your single posts are forgetting what category they’re in, that would likely be a configuration issue when setting up the post/category.

    Is there somewhere I can see this issue?

    #21236
    Simon
    Participant

    Thank you – Is there a way of sending you the link and password to the staging site? (I can’t see a box for that on this forum, as there is on GP.)

    #21265
    David Beckwith
    Participant

    Hi there,

    do you have a GP Premium account as well ? As the issue is more related to selecting which Header Element is being displayed you could raise a topic there.

    #21411
    Simon
    Participant

    Hi

    I have a GP Premium account, and will take up part of the issue there. Thank you! But I’ll take this one to a conclusion…

    To try to resolve the problem above, I changed the permalinks to include the category in the url for every post. I can now see that one category gets hard-wired into the post’s url when it’s written, even when multiple categories are selected.

    So on my original question, I guess there is no chance that a post can display within each of the categories in which it is posted and listed? – ie keeping the category Hero. (I guess it would require WP Show Posts to set the category in the post’s link, and then a canonical url to deal with the duplication.)

    As a second-best solution (following your recommendation to someone else on the GeneratePress forum) I installed Yoast (free) in order to select a “primary category”, so that the display category of a post can be selected by the author, rather than appearing random. That Yoast setting is ignored, so it’s not solved, – but it’s now a different question…

    Thank you and best wishes.

    #21413
    Simon
    Participant

    Solved the problem of Yoast Primary Category not working – in case it’s useful for someone else. Sometimes I just need to select the Primary Category, and then click Update, and then refresh the editor page. If that doesn’t change the post’s url (as shown in the editor sidebar), I have to deselect the other categories, set the remaining desired category as the Primary Category, Update, then add in the other categories, and then Update again. So far it has then stayed with the desired category.

    #21539
    Tom
    Keymaster

    Glad you got that sorted.

    Did you end up opening a GP topic about the Element issue?

    #21558
    Simon
    Participant

    Hi. No I didn’t, because I decided that what I had wanted to do probably logically isn’t possible. I think there is no way that a post can be reached within each of the categories in which it is posted and wpsp listed – ie keeping the category Hero. That became clear when I included the categories within the post URLs. So thank you for helping to clarify.

    #21651
    Tom
    Keymaster

    No problem! 🙂

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.