Skip Navigation

[Gelöst] Create a Custom Paging using Values of a custom field assigned to posts

This support ticket is created vor 1 Jahr, 7 Monaten. 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 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Hong_Kong (GMT+08:00)

Dieses Thema enthält 1 Antwort, hat 2 Stimmen.

Zuletzt aktualisiert von Luo Yang vor 1 Jahr, 7 Monaten.

Assistiert von: Luo Yang.

Author
Artikel
#2604471

Hi,

I am a magazine publisher and we want to add a special section to out website where we will publish contents of a magazine issue. What I like to add to my page is a "Custom Paging" - and I need some help or at least an initial hint how to create it with Toolset.

What I have: Custom Fields like "issue", "page_from" and "page_to" (instead of the field "issue" I even better like to use a Custom Taxonomy to mark a post belonging to a certain issue there. But for maybe an easier start let's assume we have all needed data for a post in the group of custom fields mentioned above...

Now I want to to add a "magazine page navigation" which works like this:

* If I am on a post that has the values e.g.: issues = 2023, page_from = 10, page_to = 12 (means the printed story = post starte on page 10 and reached till page 12. In WordPress all the contents from the three pages are in this one post...)

* Now there should be two buttons like "previous page" and "next page"

* previous page should link to a post with custom field values: issues = 2023, page_to = 9
* next page should link to a post with custom field values: issues = 2023, page_from = 13

How can I do this?

Some hints would be more than welcome!

Kind regards, Martin

#2604657

Hello,

There isn't such kind of built-in feature within Toolset plugins, you might consider custom codes, for example below similar thread:
https://wordpress.stackexchange.com/questions/118697/customize-the-previous-post-link-output

You can get the custom fields with WordPress function get_post_meta():
https://developer.wordpress.org/reference/functions/get_post_meta/