Skip Navigation

[Resolved] drop down ancestor with link

This support ticket is created 3 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Tagged: 

This topic contains 30 replies, has 2 voices.

Last updated by kayser 3 years, 11 months ago.

Assisted by: Shane.

Author
Posts
#1922037

Hello
I can't activate the links in the "les artistes" drop-down menu.
I am attaching the code that is in my search view.
Can you give me a solution
Thank you
Guy

hidden link

[wpv-filter-start hide="false"]
[wpv-filter-controls][wpv-control-post-relationship ancestors="artiste@livre-artiste.child" url_param="wpv-relationship-filter"]
<div class="form-group">
<label for="wpv-relationship-filter">[wpml-string context="wpv-views"][/wpml-string]</label>
[wpv-control-post-ancestor type="select" default_label="Les artistes" ancestor_type="artiste@livre-artiste.child"]
</div>
[/wpv-control-post-relationship]
[/wpv-filter-controls]
[wpv-filter-end]

#1922205

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Guy,

Thank you for getting in touch.

Its seems that your search is missing a submit button. Can you add it to the view filters and let me know if the issue still remains?

There is a button on the Filter editor to add the submit button.

Thanks,
Shane

#1923659

Hi shane
I added the button but nothing happens
Guy

#1923743

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Guy,

Would you mind providing me with admin access to the site so that I can have a look at this for you?

I've enabled the private fields for your next response.

Thanks,
Shane

#1923921

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Guy,

I spotted a few issues, the first is that you view had an empty output, this means that it won't display anything even if the filter returns a result.

I went ahead and added some content to the view so that you can see what it displays after you've filtered it.

Please let me know if this helps.

Thanks,
Shane

#1923979

Yes Shane, its help me a lot
but
If I choose an artist and validate with the button I have the right list of books of this artist.
If I select one of these books I display it, but the list displays all the books of all the artists.

How can I make sure that when I choose and validate the choice of an artist the list of these books is displayed and that his first book is visible?
until i choose other artist
Thanks
guy

#1924287

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Kayser,

Ok so given that you are already using the Post Relationship filter for the select dropdown, you won't be able to get the information from the page to automatically list this out.

You can only do one at a time , You can only list out based on the current page or list based on the selected dropdown.

Thanks,
Shane

#1924335

Okay, so what is the best way to achieve what I described in my previous answer?
Guy

#1924341

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Guy,

The only way this is possible is to use two separate views.

One view will use the Post Relationship filter as a static filter in order to get the relationship information for the current page, while the other will be the one you currently have now where you can select a Book and it will list out the artists.

Thanks
Shane

#1924413

Shane
in this artist content template
hidden link

and it might solve my problem if I can post the books of each of the artists

#1924479

that was my problem
I created a content template for artiste with a view, on the events and speaker model.
with artistes and livres
I want to show all livre from the current artiste
but in this view when i want select a field, I find current artiste and non current livre even if I have validated it in the view content

#1924689

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Guy,

The view is correct, the only issue is that when you create your views you will need to tell the view how you want to display the content.
hidden link

As you can see from the above i've added the post title to the view so it should be displaying the titles of the items in the relationship.

Thanks,
Shane

#1927665

Hello Shane
For problems with https, I have changed the address of the site
hidden link

thank you I was able to move on, but I still have two questions

I have three custom post types
artists (artistes)
books (livres)
works on paper (oeuvres sur papier)

1_Some of the artists have books, some have works on paper and some have both.
and in this archive I can't show just the artists with books.
hidden link
this one has books
hidden link

this one does not have a book and is displayed anyway
hidden link

2_ hidden link
when I chose a book, the name of the artist, these custom fields, these taxonomies are present.
But I can't display
the list of links to the artist's other books.

and a simple list of the artists that links to their page
like the one hidden link
in the form of a drop-down list
thanks
Guy

#1928205

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Guy,

1_Some of the artists have books, some have works on paper and some have both.
and in this archive I can't show just the artists with books.

I'm assuming here that you want to show the artists that only has a child post correct? If so then this will require some amount of custom coding to check the relationship to see if the Artists has books and pass that shortcode into our conditional blocks to check.

when I chose a book, the name of the artist, these custom fields, these taxonomies are present.
But I can't display
the list of links to the artist's other books.

For this i'm assuming you want to display the brother pages in a case like this you will need to follow the instructions in the link below in order to achieve this.
https://toolset.com/documentation/legacy-features/views-plugin/displaying-brother-pages/#1

Displaying the brother pages will require that you use the classic editor as this functionality is not yet available in the Block editor.

Thanks,
Shane

#1928315

Hi Shane
For the first answer, I find it difficult to understand.
Is it possible to add a custom field with a unique value in the custom post "livres" to create a simpler condition and how?

For the second one I followed "Displaying Brother Pages" and nothing is displayed in the content template. "liste des livres de l'artiste", located in the template for displaying "livres"

hidden link