0

I have a navigation bar in homepage. I don't want show categories in navigation bar.

I also do not want use a dropdown menu. I just want to have a link to a page that show all categories.

enter image description here

I want when clicked a link in this case categories, my categories show like below:

enter image description here

but don't know do it.

Any suggestions?

3
  • 1
    So what exactly do you want. Do you want a dropdown menu containing list of categories or you want to have a page that lists categories? It's not clear, please explain more in you question by editing it
    – Robert hue
    Oct 30, 2014 at 5:07
  • tank you, No, I do not want use dropdown menu.i want just have a link to categories. dropdown menu go to category.php but i want a link to a page that show all categories.
    – younes
    Oct 30, 2014 at 5:23
  • If you want to show a list of categories on a page then I am not sure why you cannot do that. You can create a page to use custom template. Please check the code I posted.
    – Robert hue
    Oct 30, 2014 at 5:31

1 Answer 1

1

To show all categories on a page, you will have to create a new page template.

<?php
/**
 * Template Name: Categories Page
**/

get_header(); ?>

    <!-- content -->
    <div id="content">

        <ul class="category-list">
            <?php wp_list_categories( 'title_li=' ); ?>
        </ul>

    </div>
    <!-- / content -->

<?php get_footer();

Now create a new page for categories in WordPress admin and select this page template Categories Page from template list.

And add this page to your menu. That's it.

Of course you will have to create CSS styles for appearances.

1
  • wow...tanx alot. tank you so much... exellent
    – younes
    Oct 30, 2014 at 6:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.