Skip Navigation

[Fermé] Start a view on the page that contains specific post ID?

This support ticket is created Il y a 3 années et 10 mois. 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)

Marqué : 

Ce sujet contient 5 réponses, a 2 voix.

Dernière mise à jour par Shane Il y a 3 années et 10 mois.

Assisté par: Shane.

Auteur
Publications
#1919227

Hi there,

Is it possible (I imagine using custom hooks) to start a view not on page 1, but on the page that contains a given post id?

For example, if I have 100 posts, across 10 pages. I want to start on the page that contains a particular post. It could be page 7, or page 3, for example?

#1919325

Shane
Supporter

Les langues: Anglais (English )

Fuseau horaire: America/Jamaica (GMT-05:00)

Hi Jean,

Thank you for getting in touch.

If I understand correctly, you've added your view to a content template but you only want the view to show on specific pages correct? If so was this template created using the gutenburg editor?

Please let me know.
Thanks,
Shane

#1919345

Hi Shane,

Not quite.

It's a view that I've included via [wpv-view] shortcode on a blocks page.
But, I don't want it to only show on certain pages.

The view itself appears on one page only, but I want the results to be paginated.
So, say I have 100 results in the view across 10 pagination pages. I want to search for a particular result and start the view pagination on that page.

Imagine if you're in a category of 'T Shirts' and there's 100 t-shirts on 10 pages.
I want to start displaying the results on the pagination page that contains a specific t-shirt. So I'll need to find out which of those pagination pages it's on and start the view from there. I can't change the default order.

Thanks - hope that makes sense!

#1919439

Shane
Supporter

Les langues: Anglais (English )

Fuseau horaire: America/Jamaica (GMT-05:00)

Hi Jean,

I believe I understand a bit clearer now. However I dont believe this is something that you will be able to achieve unless you modify the page URL itself to have the pagination information in the url for the view.

This will tell the view that it needs to start on X page, You will need to go to each of your pages and add the appropriate URL parameter to the end of the links.

Let me know if this is something that you are aware of how to do.

Thanks,
Shane

#1919465

Yes, I'm happy with changing the parameter of the URL, that's fine 🙂

Do you know which parameters I might need to add to do this? Thank you!

#1919707

Shane
Supporter

Les langues: Anglais (English )

Fuseau horaire: America/Jamaica (GMT-05:00)

Hi Jean,

If you point me in the direction of a page that has the pagination I can let you know what is the parameter in the URL.

Thanks,
Shane

Le sujet ‘[Fermé] Start a view on the page that contains specific post ID?’ est fermé à de nouvelles réponses.