I have created custom post type called "Quotes".
I have around 50 other custom post types like : Restaurants, Watersports , Bars , Nature etc...
I have assigned custom post type "Quotes" as Children Post Types to other custom post types mentioned above.
Now, I have added posts to custom post type and for each post I am adding quotes.
I have detail page for each post added in : Restaurants, Watersports , Bars , Nature..In that page I would like to display quotes added to particular post in slider which is working fine with view I have created with query filter "Post where this View is shown".
I would like to display post Image and title as well for which I have added quote..
To achieve that I have put something like this :
But, It is not giving me post title and the field value of area-name of post in detail page.
Instead, It is giving me title of quote.
Example,
Custom Post Type : Restaurants
Post Added : Indian
Quote added to post "Indian" : Best Restaurant
Now, On detail page of post "Indian" I would like to show "Best Restaurant" in slider which is working fine.
But, To display post title "Indian" in slider I wrote [wpv-post-title id="$parent"] which is not working and returning the title "Best Restaurant" Instead of "Indian".
If I write [wpv-post-title id="$restaurant"] it is giving me title "Indian" but then I need to create multiple view for each post type which is not correct.
The same view I am calling view like this
[wpv-view name="quote-slider-overview-page" wpvprchildof="$restaurant"]
Now, if I put condition in my view something like this
This is working ---> [wpv-post-title id="[wpv-attribute name='wpvprchildof']"] returns title
This one is not ----> [ratings id="[wpv-post-id id='[wpv-attribute name='wpvprchildof']']" results="true"]
Well - that is wrong syntax even though you are using it 🙂 and not the suggested way even though you are having results. However - I'm surprised that how its displaying the results.
You must have added your view to parent or whatever.
Please let me know for which post you want to display the child posts, and send me access I need to check and correct the things so the buggy syntax you are using should not effect you in future.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).
I have set the next reply to private which means only you and I have access to it.
As you can see in the page I have given..That is for restaurant so on that page I would like to display quotes from all posts which are added in 'restaurant' post type...
I see slider is screwed up..It is not working as it was before..
It is not displaying image,taxonomies name and other stuff.
You want to display all quotes that belongs to any restaurant post(s)? I do not able to see CPT quotes or restaurant in backend, did you hide it?
Ans : yes, it is inside eating & drinking > resturants and quotes is set child post of resturants
On this page : hidden link
I want to display all quotes that belongs to any watersport post(s).quotes is set child post of watersport.
At the moment it is displaying quotes from all post types..but it should display only from watersport posts.
On this page : hidden link
I want to display all quotes that belongs to any watersport post(s).quotes is set child post of watersport.
At the moment it is displaying quotes from all post types..but it should display only from watersport posts.
==> Is this another requirement?
==> Does this page using same view as you are displaying quotes under slider?
in order to avoid any confusion, please give me both problem urls and view's its using separately so I can think of the solution.
==> Does this page using same view as you are displaying quotes under slider?
Yes Minesh..
I have an overview pages for resturant,watersport which is displaying posts from resturant and watersport respectively.
Now, for each post in resturant,resturant I am adding quotes.
Restautrants : hidden link
Water Sports : hidden link
My requirement is to get all quotes from Resturants posts on this page : hidden link with Resturants post name,image,taxonomy title(ie:zanzibar)
And get all quotes from Watersports posts on this page : hidden link with Resturants post name,image,taxonomy title(ie:kiteboarding on bonaire)
I am not sure if it is possible with single view..Or we can pass an argument to a view.
If its possible with single view then I will directly call that view from content template.
if we are going to pass an argument then I will add it to the custom field editor and I will use that field to get view shortcode.
It is displaying same date, Instead of that hidden link
Should display 2 quotes
1)nice place & 2) Blue quote..because they are from restaurant post hidden link
Should display 1 quote
1)Kite..because they are from watersport post
Well - for such structure it needs nested view in order to loop through all parent (restaurant) and get their child posts (quotes) and display it.
I've created this view for parent (restaurant):
=> hidden link
- check loop output section (I've added child view that display quotes to this view)
I've adjusted the parent using $restaurant instead of [wpv-attribute] shortcode to all your shortcdoes used inside the child view (quotes):
=> hidden link
- check loop output editor section
- check query filter section
I can see that its displaying only two quotes now on this page:
=> hidden link
The same way you need to create parent view for "watersport" and add child view to display quotes.
I see on this page : => hidden link it is adding blank slide in slider.
There are 2 quotes in restaurants then why it is adding 3 slides including blank slide?