Forums

[resolved] wp_list_bookmarks , Links Category whit Links (5 posts)

  1. MEGAGeek
    Member
    Posted 2 years ago #

    I have the following links:

    Category 1
    - Link 1
    - Link 2
    Category 2
    - Link 1
    - Link 2

    I have custom links that open a page that category is called = the name of the category, which is what I lack.

    wp_list_bookmarks('title_li=&title_before=<a href="?page_id=">&title_after=</a>&categorize=1&before=<li>&after=</li>&show_images=0&show_description=0&orderby=url');

    I have to put after page_id

    Currently I get:

    <a href="?page_id="> Category 1 </ a>

    But I need to get:

    <a href="?page_id=Category 1 "> Category 1 </ a>

    ---
    SPANISH
    ----

    Tengo las siguientes Categorías de enlaces:

    Categoría 1
    - Enlace 1
    - Enlace 2
    Categoría 2
    - Enlace 1
    - Enlace 2

    Tengo personalizado que los enlaces de categoría abran una pagina que se llama = que el nombre de la categoría, que es lo que me falta.

    wp_list_bookmarks('title_li=&title_before=<a href="?page_id=">&title_after=</a>&categorize=1&before=<li>&after=</li>&show_images=0&show_description=0&orderby=url');

    Que tengo que poner después del page_id

    Actualmente obtengo:

    <a href="?page_id=">Categoría 1</a>
    Pero necesito obtener:

    <a href="?page_id=Categoría 1">Categoría 1</a>

  2. esmi
    Theme Diva & Mod
    Posted 2 years ago #

    Use category if you want to limit by category ID or `category_name' to limit by category title.

    http://codex.wordpress.org/Template_Tags/wp_list_bookmarks

  3. MEGAGeek
    Member
    Posted 2 years ago #

    Thanks for your help.
    But no answer to my question.

    By default the categories the links, no links.

    All I need to know where to put -----

    wp_list_bookmarks('title_li=&title_before=<a href="?page_id=-----">&title_after=</a>&categorize=1&before=<li>&after=</li>&show_images=0&show_description=0&orderby=url');

    If it is not great to ask, it might illustrate an example.

  4. MEGAGeek
    Member
    Posted 2 years ago #

    And solve the problem.

    I modified the "wp_list_bookmarks"

    Although not the most appropriate for the subject of updates, my problem solved.

    I solved the problem by adding an extra optional parameter that indicates whether the class will include a link or a link.
    a greeting.

  5. Mark / t31os
    Moderator
    Posted 2 years ago #

    The function grabs the links from your bookmarks already, it looks like you're essentially re-writing that function to do something it already does by itself...

    If you're linking to your own pages, then use URLs in the bookmarks that reflect those pages...

    You're over-complicating the task...

Topic Closed

This topic has been closed to new replies.

About this Topic