Support » Fixing WordPress » wp_list_cats in header

  • Resolved nasirmajor

    (@nasirmajor)


    i want to show categories list in header as well. before that they are being shown in left panel of wordpress theame im using.
    can this function be called twice in same file?
    errors are asking to include following files that im adding as well.
    ============
    <?php include_once(“wp-config.php”); ?>
    <?php include(“wp-includes/wp-db.php”); ?>
    <?php include(“wp-includes/category-template.php”); ?>
    <?php include(“wp-includes/plugin.php”); ?>
    <?php include(“wp-includes/formatting.php”); ?>
    <?php include(“wp-app.php”); ?>
    <?php include(“wp-includes/functions.php”); ?>
    <?php include(“wp-includes/deprecated.php”); ?>
    ========
    even after that an error comes unable to set connection with database.

    ——————

    being my first wordpress project im totally new to it. anyone help for right direction how to solve this out?

Viewing 2 replies - 1 through 2 (of 2 total)
  • moshu

    (@moshu)

    You must be doing something wrong…
    Yes, you can use the

    <ul>
    <?php wp_list_categories(); ?>
    </ul>

    code both in the header.php and in the sidebar.php. Just tested; it should NOT require any complicated stuff as you posted above.

    Thanks dear Moshu
    the problem is solved
    it was the problem of theme header code before <html> tag. i replaced it with the default theme headers code and problem was resolved.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘wp_list_cats in header’ is closed to new replies.