Skip Navigation

[Resolved] How can I ad a pagination with letters for a tech terms wiki

This support ticket is created 5 years, 10 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 1 reply, has 2 voices.

Last updated by Christian Cox 5 years, 10 months ago.

Assisted by: Christian Cox.

Author
Posts
#1193273

How can I ad a pagination with letters for a tech terms wiki

Hi there,...

I am building a kind of wiki for tech terms on a ustomers website. I created a CPT for it and want to list the terms by a filter on top of the terms. The Filtering should be showing all relevant or existing letters in a row. If the visitor clicks on a letter the page should show the relevant terms starting with this letter.

How can I realize it, any suggestions?

best regards
Jörg

#1193375

Hi, the fastest way to get this up and running is to create a custom taxonomy called "First letter" and add a taxonomy term for each letter, like "A", "B", "C", and so on. Then edit each "Tech Term" post and add the corresponding first-letter taxonomy term to each post. So for the Tech Term "Publishing" you'll add the first-letter term "P". For the Tech Term "Internet" you'll add the first-letter term "I", and so on.

Next, create a View of Tech Term posts, using the "full custom display mode" option in the new View popup. In the Search and Pagination panel, insert a new Filter to filter by the First-letter taxonomy. Choose a "Select" type filter. Add a submit button, then place this View on a custom Page somewhere and test it out. Select a term, submit. You'll notice that the URL parameter changes to reflect the selected term filter, like this:

<em><u>hidden link</u></em>
<em><u>hidden link</u></em>
<em><u>hidden link</u></em>

You don't want to show the select filter on your site, so edit the View and remove the filter from the Search and Pagination editor area. Do not remove the corresponding Query Filter - it's required for the custom alphabetical term filter we'll create next.

After that, create a View of the First-letter Taxonomy terms. Order by term title, alphabetically, ascending. In the Loop output editor, you can create a link to the corresponding filtered search page, something like this:

<a href="<em><u>hidden link</u></em>">[wpv-taxonomy-title]</a>

Place this View on the same page as the custom search View. Now you should see a list of term links. When you click one of those links, the page reloads with the filtered results.

If a taxonomy-based approach is not acceptable, you can do something similar with custom fields, or you'll have to use the Views API and some custom PHP code to get exactly what you're looking for. Let me know if you have questions about this approach.