I think I may be making this scenero more difficult than it needs to be but I can't figure out how to accomplish this:
I have a post type titled Apartments. I have a taxonomy associated with Apartments called Neighborhoods.
On an apartment page I want to display specific text depending upon the Apartments neighborhood.
What steps would I take to accomplish this?
Thanks so much in advance for ideas, help and support.
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Randi,
Thank you for contacting our support forum.
Let me see how best I can assist with this one 🙂
From your post I gather that you will like to display information on the Neighbourhood on the Apartment page itself correct?
Please let me know.
Thanks,
Shane
Hi:
Thanks for the quick followup.
Yes that is correct. The neighborhood content to display is dependant upon the neighborhood taxonomy.
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Randi,
Thank you for confirming.
What you can do is to use our views plugin to do this.
With our views plugin you are able to create a view and place it on the page so that it will list out the information of the current page taxonomy.
Given that you have the Views plugin installed you can just follow the instructions in the link below.
https://toolset.com/documentation/user-guides/querying-and-displaying-child-posts/
The steps are the exact same and the only things you will do is instead of selecting a post to display you will select a taxonomy.
Also when you reach to the filter section you will add a filter similarly to the one in my screenshot.
Next you will populate the view Loop output section with the information for the taxonomy using the loop wizard. See Screenshot.
Finally all you need to do next is to add this view to the page.
Please let me know if this helps.
Thanks,
Shane
Thanks for the valuable details. It worked!
But I now have a new problem related to this.
I created two views. One to display taxonomy field group 1 which displays on the page. A second to display taxonomy field group 2 in a "Read More" pop up.
When I just have one used it works. But when I use both just one of them works. Could this be due to the "limit" or "offset" numbers?
Here is my first short code for View 1:
[wpv-view name="view-for-chicago-apartment-neighborhood-data" limit="-1" offset="0"]
Here is my short code for View 2 (a Read More pop up):
<div style="display block"><button class="btn btn-primary btn-sm" style="background-color: #EEE; text-align: center; vertical-align: middle; font-size: 16px; color: #242424; border: 1px solid #fff;" data-toggle="modal" data-target="#myModal"><br>
READ MORE <i class="fa fa-caret-right" aria-hidden="true"></button></div>
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><br>
<span aria-hidden="true">×</span><br>
<span class="sr-only">Close</span><br>
</button><p></p>
<h4 class="modal-title" id="myModalLabel">[wpv-post-taxonomy type='neighborhood' format='name']</h4>
</div>
<div class="modal-body">
[wpv-view name="chicago-apartment-neighborhood-pop-up-data" limit="-1" offset="0"]</div>
</div>
</div>
</div>
Hello:
I figured it out and it is working beautifully. Thanks again for everything!