Resolving Magic Tags in Shortcodes from singular pages.
-
I have a Custom Post Type called ‘community’. Everything is working well, except one thing…
I have the following code on a singular page for a community. What I’m trying to do is display the other communities of the same type. The query works, as I can tell I’m getting the proper number of responses back. But when I try and output information from the returned results, the magic tags resolve to the current page I’m on and not the query results.
In other words, I’m on the ‘Miami’ community page. The returned results should be ‘Broward’ and ‘Palm Beach’, but instead, I just get ‘Miami’ for each result.
Is there a way to have the magic tags resolve to the results and not the page I’m on?
<ul> [pods name="community" limit="30" where="geotype.meta_value = '{@geotype}'"] <li>x{@post_title}</li> <!--- magic tag method --> <li>y[pods field="post_title"]</li> <!--- shortcode method --> [/pods] </ul>
- The topic ‘Resolving Magic Tags in Shortcodes from singular pages.’ is closed to new replies.