Skip Navigation

[Resuelto] Create a Glossary A | B |C

This support ticket is created hace 5 años, 10 meses. 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.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

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)

Este tema contiene 8 respuestas, tiene 2 mensajes.

Última actualización por NuriaB8607 hace 5 años, 10 meses.

Asistido por: Minesh.

Autor
Mensajes
#1181386
Clipboard01.jpg

Hello,
I want to create at the top a a page a listed horizontally alphabet so A|B|C|for my custom post type called "Artistas". When you clic in "A" you can see all the "Artistas" that the post titled begin by "A".
Something like the screenshot that I attached.
Thanks in advance for your help.
Nuria Benaches.

#1181397

Minesh
Supporter

Idiomas: Inglés (English )

Zona horaria: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - if you want to build a glossary filter (A....Z), please try to follow the following steps:

1)
Create a taxonomy namely "alphabets" and add A to Z as the single filter character.

2)
Now create a new view that will list all the terms for taxonomy "alphabets". The loop output section should look like this:

[wpv-layout-start]
    [wpv-items-found]
    <a href="[current_url]">All</a>
    <!-- wpv-loop-start -->
        <wpv-loop>
            <a href="?wpvalphabet=[wpv-taxonomy-title]">[wpv-taxonomy-title]</a>
        </wpv-loop>
    <!-- wpv-loop-end -->
    [/wpv-items-found]
    [wpv-no-items-found]
        <strong>[wpml-string context="wpv-views"]No items found[/wpml-string]</strong>
    [/wpv-no-items-found]
[wpv-layout-end]

-- Add the following code to your current themes funcitons.php file

/**
 * Register custom shortcode to output url of current page
*/
add_shortcode( 'current_url', function(){
 
    $request = $_SERVER['HTTP_HOST'].strtok($_SERVER["REQUEST_URI"],'?');
    $protocol = '<em><u>enlace oculto</u></em>';
 
    if ((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off')) {
        $protocol = '<em><u>enlace oculto</u></em>';
    }
    return $protocol . $request;
} );

3)
Now create another view for which you want to display your posts filter by the taxonomy "alphabets" as URL param.

[wpv-layout-start]
[wpv-view name="alphabet-terms"]
[wpv-items-found]
<!-- wpv-loop-start -->
        <wpv-loop>
            <h3>[wpv-post-link]</h3>
        </wpv-loop>
    <!-- wpv-loop-end -->
    [/wpv-items-found]
    [wpv-no-items-found]
        <strong>[wpml-string context="wpv-views"]No items found[/wpml-string]</strong>
    [/wpv-no-items-found]
[wpv-layout-end]

Where:
- You need to add query filter for your taxonomy as shown with the following screenshot.
=> enlace oculto

More info:
=> https://toolset.com/documentation/user-guides/filtering-views-by-taxonomy/

#1181403

Hello,
Thank you for your quickly answer.
I have made all the steps you detaill me. How can I insert that alphabetical view for a item menu?
Regards,
Nuria.

#1181426

Minesh
Supporter

Idiomas: Inglés (English )

Zona horaria: Asia/Kolkata (GMT+05:30)

Sorry - you can use fields and views button to insert the view.

If you check step #3 - I already added the taxonomy view:

[wpv-view name="alphabet-terms"]

If you have any other doubts please share the screenshot with more details that will help me to understand your issue.

#1181442
screencapture-macvac-ultimobyte-es-wp-admin-admin-php-2019-01-10-14_04_39.png
screencapture-macvac-ultimobyte-es-wp-admin-admin-php-2019-01-10-14_04_08.png
Screenshot_3.png
Screenshot_2.png
Screenshot_1.png

I have do something wrong.
I attached you screenshot for the wrong view for Glossary, I only can see a lot of "A". I attached you a fex screenshots for you have all the informations.
Thanks
Nuria.

#1181503

Minesh
Supporter

Idiomas: Inglés (English )

Zona horaria: Asia/Kolkata (GMT+05:30)

Well - Yes, you did a mistake.

This view shown in the following screenshot - should be set to your desired Taxonomy and query filter you have added to it should be removed.
enlace oculto

This view should be set to the post type you want instead of taxonomy and the query filter which you added to above view should be added to this view.
enlace oculto

#1182154

Now it work correctly !!!!
Thank you very much

#1182155

My issue is resolved now. Thank you!

#1191909
screencapture-macvac-ultimobyte-es-wp-admin-admin-php-2019-01-28-11_41_29.png
screencapture-macvac-ultimobyte-es-wp-admin-admin-php-2019-01-28-11_35_45.png

Dear Minesh,
I reopen this ticket for support to you about my View Alphabet Terms, about design for the template and for include a pagination in my view. Actually, my view looks like this enlace oculto
- I want include some space and desing for the Glossary terms. I attached you an screenshot of my View, where can I include the design if the template is empty?
- Another question is how can I include the pagination for the end of the list of Artistas, by example for Artistas that begin with"A" there are more than one page but I cannot see it and I don´t know how to make pagination. In the screenshot you can see it.
Thanks in advanced,
Nuria Benaches.

Los hilos nuevos creados por Minesh y vinculados a este se encuentran a continuación:

https://toolset.com/es/forums/topic/split-create-a-glossary-a-b-c-format-question/