• Resolved tigmewp

    (@tigmewp)


    I have created a POD for tourism information offices using the following simple POD template to display the single view item in the website sidebar:

    <div class="tourism-info">
    	<h2>{@post_title}</h2>
    	<figure>
    		{@post_thumbnail.large}
    	</figure>
    	{@post_content}
    </div>

    On the page posted in the “Link to the page you need help with:” field, the Single Item Widget displays the information correctly according to the slug entered into the “Slug or ID” field of the widget.

    On a search results page, however, it displays the correct post title and featured image, BUT the “post_content” is that of the home page.

    I tried rewriting the search result URL from the normal “…/?s=stanford” (in this scenario) to read “…/search/stanford” thinking that it could be the URL defaulting to the home page, but the error remains. I also used the post ID instead of the slug, thinking that an implicit post ID might solve the error, but it still shows the home page content instead of the tourism information post content.

    Two other possibly noteworthy items:

    1. There is a bi-directional relationship field in this pod relating to another PODS post type called “Towns”, but it is not used at the moment. Could it still have an effect, though?
    2. A plugin called “If Widget – Visibility control for Widgets” is used to control on which pages certain widgets are visible.

    Any ideas would be appreciated.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @tigmewp

    This is a weird one (and sorry for my late reply).
    Not sure if you found the issue already but could you please try and test if this issue also occurs when only the Pods plugin is active?
    https://docs.pods.io/faqs/plugin-theme-conflicts/

    Cheers, Jory

    Thread Starter tigmewp

    (@tigmewp)

    Hallo Jory

    No worries – as a matter of fact, I forgot about this post ??

    A much more dynamic approach was needed, as we wanted the current page URL to determine which PODS result to show in the sidebar of the current page. I created a custom PHP file, which was then included in a PODS template using the following shortcode:
    [pods view="my-custom-query.php"]

    So, the original issue is not solved, but I suspect it never would have worked because of the bi-directional connections that inter-link three individual PODS required for this site. Only a very complex series of MySQL queries were able to produce the desired results.

    On this note, thank you for a great plugin.

    Regards,
    Mariska

    Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @tigmewp

    Good to hear you’ve found a solution! Thanks for letting us know!

    Cheers, Jory

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Single Item Widget’ is closed to new replies.