Skip Navigation

[Resolved] Display on Single post page "previous" and "next" for custom post type template

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)

This topic contains 5 replies, has 2 voices.

Last updated by Minesh 1 year, 1 month ago.

Assisted by: Minesh.

Author
Posts
#2657265

Tell us what you are trying to do?
I have created a Single archive page and I want to display the previous and next post
(displaying of the feature image, the post title and few other details

Is there any documentation that you are following?
I have research your video tutorials on youtube and found nothing that discuss that

Is there a similar example that we can see?

What is the link to your site?
This is a copy of the live site - this is one of the CPTs "Papers & Opinions"
hidden link

#2657293

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

If you are using Blocks - you should try to add the "Fields and Text" block and then try to click on "Add Field or view" and further click on the button "post previous link" and "post next link" button respectively to add post previous and post next link.

More info:
- https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#vf-554769
- https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#vf-554770

#2657353

Hi Minesh,
Thank you for your reply. I was able to see the Title BUT I am looking for something a bit more elaborate in a sens that Next and Previous "widget" would also display the post's featured image and maybe the Author' display name (with link).
Don't you have such block?
Thank you
Pierre

#2657593

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

There is no such block available but you can display the featured image using by adding custom code.

Here is the related ticket with the solution about how you can display featured image with prev-next post link:
- https://toolset.com/forums/topic/displaying-featured-image-of-previous-and-next-post-on-single-post-page/#post-1210210

You can even add the mentioned custom code with above reference ticket to "Custom Code" section offered by Toolset:
- https://toolset.com/documentation/programmer-reference/adding-custom-code/using-toolset-to-add-custom-code/

The same way you can display the post author using the shortcode:
- https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#vf-154504

[wpv-post-author format="meta" meta="nickname" item="[ts_get_adjacent_post_id]"]

You should also register the custom shortcode at Toolset -> Settings page, click the Front-end Content tab and add your shortcode name in the Third-party shortcode arguments section:
- https://toolset.com/documentation/programmer-reference/adding-custom-code/how-to-create-a-custom-shortcode/#using-the-custom-shortcode

#2657855
Toolset - Footer of single post.jpg

Hi Minesh,

Thank you for your help, I am making progress in resolving my issues
I need help with the 4 issues below :

1) I have not manage to set the condition to hide the last post (When Next post doesn't exist) ... respectively hide the First post (when the Previous post does'nt exists), could you help me with that?

2) I would like to prefix the post's author link name with the word "By" how can I do that since the Author is a shortcode [wpv-post-author format="link" meta="name" item="[ts_get_adjacent_post_id]"]

3) the display is also a bit odd since I had to use for the Title linked shortcode "[wpv-post-previous-link]" respectively [wpv-post-next-link] ... It has by design the small chevron.... How can I change it (remove, replace or modify that chevron)

4) I have managed to find another interresting resolved issue (from your colleague Waqar) to use intead the featured image with the respective post link. But it doesn't indicate where should use that code (I have pasted below) to get it working... That code is also very interesting since I can tweak the featured image size!!!
How can I modify the previous from code ?

https://toolset.com/forums/topic/prev-next-pages-using-featured-image/
-----------------
// previous post link

[wpv-post-featured-image size="custom" width="100" height="100" crop="true" item="[ts_get_adjacent_post_id previous='true']"]

// next post link

[wpv-post-featured-image size="custom" width="100" height="100" crop="true" item="[ts_get_adjacent_post_id]"]

-----------------

#2658363

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

As per our support policy, we entertain only one question per ticket. This will help other users searching on the forum as well as help us to write correct problem resolution summery.

I'll split the ticket with every new question you have. Here is the split ticket and we will continue there:
- https://toolset.com/forums/topic/split-display-on-single-post-page-previous-and-next-for-custom-post-type-template-hide-next-button-on-last/

You're welcome to mark resolve this ticket.

#2661413

It seems that this ticket is now split...