Skip Navigation

[Résolu] Show pagination in the content template to view the next & previous post

Ce fil est résolu. Voici une description du problème et la solution proposée.

Problem:
How to display next and previous post links with content template

Solution:
You can use view's shortcocdes [wpv-post-next-link] and [wpv-post-previous-link] to display next and previous post links.

You can find proposed solution, in this case, with the following reply:
https://toolset.com/forums/topic/show-pagination-in-the-content-template-to-view-the-next-previous-post/#post-838201

Relevant Documentation:
=> https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-next-link
=> https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-previous-link

This support ticket is created Il y a 6 années et 7 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

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

Dernière mise à jour par thisaraN Il y a 6 années et 7 mois.

Assisté par: Minesh.

Auteur
Publications
#837631
audrea.jpg

Tell us what you are trying to do?
Create two buttons (image buttons) to view the next & previous post in the content template ( i really need to do this) I tried adding shortcodes (taken from the views) to the href="[wpv-pager-prev-page][/wpv-pager-prev-page]" but it didn't work.

Is there any documentation that you are following?
https://toolset.com/documentation/user-guides/using-toolset-with-wpbakery-page-builder/create-templates-for-custom-post-types/
https://toolset.com/documentation/user-guides/views-pagination/

Is there a similar example that we can see?
Attached image of one staff

What is the link to your site?
I'm working on my local server

#838201

Minesh
Supporter

Les langues: Anglais (English )

Fuseau horaire: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

I see you are using wrong shortcode to render previous and next post links.

Could you please use following shortcodes. For example:

For Previous post:

[wpv-post-previous-link format="" %%LINK%%" link="Previous post: %%TITLE%%"]

For Next post:

[wpv-post-next-link format="%%LINK%% "" link="Next post: %%TITLE%%"]

More info:
=> https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-next-link
=> https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-previous-link

#838371
vc.png
tim.png

Hi There,

Thanks for your response. I tried them, but the shortcodes appear on the front end. (attached) Am I doing anything wrong?

Cheers

#838420

Minesh
Supporter

Les langues: Anglais (English )

Fuseau horaire: Asia/Kolkata (GMT+05:30)

Well - I see you are using something raw HTML container.

Please use the container that able to parse the shortcode. Try to use Text module.

I suspect you are using Visual Composer to design your content template. Please check following Doc that may help you:
=> https://toolset.com/documentation/user-guides/using-toolset-with-wpbakery-page-builder/create-templates-for-custom-post-types/

#838452

I tried the text module (WYSIWYG) on both Visual & HTML. It still doesn't work.

And I can't find instructions to add pagination using Visual Composer.

#838455

Minesh
Supporter

Les langues: Anglais (English )

Fuseau horaire: Asia/Kolkata (GMT+05:30)

Well - to find whats going wrong, could you please share problem URL and access details.

*** 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.

#839255

I tried putting together a demo site for you to jump in & have a look around, then I used latest plugins including WP bakery latest composer & now the links work fine.

Thanks for your support