• Here there,

    wp_list_categories is showing a fine list of my categories.

    1. I want to disable the link by replacing the url g.e.

    <a href="https://urltocat">cat</a>

    into

    <a href="#">cat</a>

    how is this possible? the codex won’t tel me

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter mediabros

    (@mediabros)

    Still searching for a solution, anyone found something?

    Thread Starter mediabros

    (@mediabros)

    It seems this is the only way to get some attention to my post ??

    maybe its just me, and it probably is. but try describing in some more detail what it is youre trying to do, like i said its probably just me, but i dont really know what youre talking about.. disbale the link… what link? detail detail detail..

    Thread Starter mediabros

    (@mediabros)

    Hi Applesfaceman,

    Apologies for not being clear enough than.

    this code

    wp_list_categories('sort_column=name&sort_order=asc&style=list&children=true&hierarchical=true&title_li=0&show_count=0&echo=0&current_category=1');

    prints a list with links of my categories and subcategories like:

    <li class="cat-item cat-item-13"><a href="https://www.website.com/category/multimedia">multimedia</a>

    What i need is:

    <li class="cat-item cat-item-13"><a href="#">multimedia</a>

    So my question is how to make that possible with the wp_list_categories function?

    you want to list specific categories relevant to the page the user is on? this sounds like what im trying to do too and have had no luck hopefully your post here will get some lookers and some good ol fashion wp help

    Thread Starter mediabros

    (@mediabros)

    i try to disable a redirection to another page by clicking. on click link > dont go anywhere, stay on current page.

    you ever get it figured out? Im trying to do the same thing. need it for some jquery tab action.

    Thread Starter mediabros

    (@mediabros)

    Yep, figured it out.

    $cat = get_query_var('cat');
    
    foreach(get_categories('parent=0&exclude=15') as $category)	{
    
    echo '<li class="parent-item"><a class="name" href="#">' . $category->name.'</a></li>';
    											}

    hope it helps you!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Disable/Change the url of the link | wp_list_categories’ is closed to new replies.