Support » Fixing WordPress » How do I use nicer slugs for this?

  • Resolved Emphacy


    I decided I wanted to redirect any page I made in the header file to a category. For instance I let the page ‘How-To’ in the navigation bar redirect to the category ‘How-To’.

    I did this by editing the header file and adding the following code for each page I wanted to redirect.

    <?php wp_list_pages('title_li=&sort_column=menu_order&exclude='.get_option('tbf1_exclude_pages')); ?>
    <li><a href="<?php bloginfo('url'); ?>/?cat=4">How-To</a></li>

    As you can see however, the code redirects to ?cat=4 or a numeric slug. In my website I want my slugs to be text; ‘how-to’ for instance.

    However if I change this in the settings to use the word based slugs rather then the numeric slugs, the page still redirects to the category and shows ?cat=4 in the address bar, but I want it to show how-to instead of ?cat=4.

    If I click on category link however, it will go to the category and will display the how-to slug in the address.

    How do I fix this? I’m assuming I should edit my code somehow.
    I hope this makes sense. Thankyou.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How do I use nicer slugs for this?’ is closed to new replies.