Single Item Widget
-
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:
- 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?
- 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]
- The topic ‘Single Item Widget’ is closed to new replies.