Views is a WordPress plugin that lets you display post relationships.
In our user guides, you can find more information on how to display child posts, related posts, brother pages, fields of parents and fields of grandparents.
When you ask for help or report issues, make sure to tell us the type of the relationship you are trying to build and the structure of your data.
Viewing 15 topics - 751 through 765 (of 808 total)
The issue here is that the user is displaying the parent post information on his child post using the types shortcode, however the incorrect information is being displayed.
Solution:
The customer was using the Beta version of our plugins that uses the new post relationship. Unfortunately as this is not a full release some functionalities may not be working as intended.
How to loop and display all parent post, then sort order that list by the date of the child post?
Solution
In a View, you can order by 2 arguments, a primary and secondary, but there is no orderby "the parent post".
As a possible solution, you can create a View, and query the Child Post Type.
Those you can order by their date in the orderby setting.
Then, in the Loop, you will have to call the related parent Posts.
What you can also do is create 2 Views, in one you query the parent post and order it by what you need, in the second View you query the Child posts (that are a child to the post in the loop).
Those you can order again as you need.
Then you insert the second View into the first's View Loop.
Then, the first View is inserted in a page, and will produce this sort of result:
- parent post (ordered by what you chose)
-- child post (ordered by what you chose)
-- child post (ordered by what you chose)
-- child post (ordered by what you chose)
- another parent post (ordered by what you chose)
-- another child post (ordered by what you chose)
-- another child post (ordered by what you chose)
-- another child post (ordered by what you chose)
The issue here is that the customer wanted to know if it was possible to display the post reference field on the intermediary CPT.
Solution:
Unfortunately this is not yet possible in our Betas. So the reference field you wouldn't be able to display as yet. This functionality should be coming in a future update when we are Pushing the new relationships API
Problem: I have several post types arranged in a combination of one-to-many and many-to-many Views. I would like some assistance creating a View filtered by Clients, and showing information about Tracks, Aliases, Pitches, Writers and Writer Shares.
Solution: Create a View of Pitches, filtered by parent Clients. In the View of Pitches, use a Content Template to access the parent Alias, where you can access the grandparent Track. Use the id attribute as needed to access custom field values or post information. Use a View of Writer Shares, filtered by parent Track, set by a shortcode attribute. In the Loop Output of that View, you can include information about the Writer Share and its parent Writer post. You can place this View in your Content Template to access the grandparent Track ID, and pass that into the View's shortcode attribute filter.
Problem:
How to Order child posts by taxonomy with custom date field
Solution:
You can use view's filter hook wpv_filter_query to modify the view's query on fly and adjust it as per your requirement by hooking custom query filters to it.
I want to know if I can filter my site according to users location ?
by making user submit a form contain his country , city and use these fields in content templates and filtering views automatically no manually ?
as I need to make a real estate website contain many cities and each city contain many posts
if user enter the site , I need him to select his location and the whole site show the content related to his location
and save these entries as cookies for his browser
Link to a page where the issue can be seen:
Is this possible using Toolset with Toolset Cred , Toolset Maps & Toolset views
Solution:
I assume you are going to achieve this:
Provide a test input box for user inputting address text, submit the form, then locate the address in the google map, and filter the results by distance range.
If it is, this is built-in feature of the latest version of Toolset Map plugin, see the document:
They enter the location and a distance radius within which to display markers. If your site is using HTTPS protocol, visitors can also use their own location as the center of the search.
Problem:
What are the options for displaying different content to different users on the front-end?
Solution:
To display different content on the front-end according to some criteria you essentially have two options.
If the thing being tested relates to the person doing the looking (the user browsing the website is registered and has a certain role because they have paid for a particular membership, for example) then you can use Access to restrict the visibility of whole pages, or to selectively show certain content on a page (as described here: https://toolset.com/documentation/user-guides/access-control-texts-inside-page-content/).
If the thing being tested relates to the thing being looked at then you would need to add custom fields to the content being viewed and then use the wpv-conditional shortcodes to test the content of those custom fields and selectively display what is wrapped in the shortcode, as described here: https://toolset.com/documentation/user-guides/conditional-html-output-in-views/