Viewing 7 replies - 1 through 7 (of 7 total)
  • Are you using any caching plugins?

    Thread Starter mgorman03

    (@mgorman03)

    I realized that my theme uses the a default layout for the pages. Code is below.

    <!– begin categories –>
    <ul class=”categories”>
    <?php wp_list_categories(‘title_li=’); ?>
    <?php dp_list_pages(); ?>

    <!– end categories –>

    So from the looks of this, it pulls the default links in a certain order. I created a navigation but it does not appear to be called.

    Any thoughts on how to call this. I guess i could do the old fashion hard code ??

    You could look at the dp_list_pages() function in your theme’s functions.php file.

    Thread Starter mgorman03

    (@mgorman03)

    Thanks ESMI … sorry if I sound like a novice here but i am ??

    Here is the code that was in there, and that was the name of my navigation:

    add_action( ‘init’, ‘register_my_menus’ );

    function register_my_menus() {
    register_nav_menus(
    array(
    ‘menu-1’ => __( ‘Navigation’ )
    )
    );
    }

    ?>

    That’s not the function you need. You need to look for dp_list_pages.

    Thread Starter mgorman03

    (@mgorman03)

    Found it ….

    I see where it is added the categories and the pages, but I have no idea with this setup how to order them, or exclude any.

    Thanks Guys !!!

    # Displays a list of pages
    function dp_list_pages() {
    global $wpdb;
    $querystr = “SELECT $wpdb->posts.ID, $wpdb->posts.post_title FROM $wpdb->posts WHERE $wpdb->posts.post_status = ‘publish’ AND $wpdb->posts.post_type = ‘page’ ORDER BY $wpdb->posts.post_title ASC”;
    $pageposts = $wpdb->get_results($querystr, OBJECT);
    if ($pageposts) {
    foreach ($pageposts as $post) {
    ?>

    • ID); ?>”><?php echo $post->post_title; ?>
    • <?php
      }
      }
      }

      # Displays a list of categories
      function dp_list_categories($num=0, $exclude=”) {
      if (strlen($exclude)>0) $exclude = ‘&exclude=’ . $exclude;
      $categories = get_categories(‘hide_empty=1’.$exclude);
      $first = true; $count = 0;
      foreach ($categories as $category) {
      if ($num>0) { $count++; if ($count>$num) break; } // limit
      if ($category->parent<1) {
      if ($first) { $first = false; $f = ‘ class=”f”‘; } else { $f = ”; }
      ?><li<?php echo $f; ?>>
      cat_ID); ?>”><?php echo $category->name ?><?php echo $raquo; ?>
      <?php
      }
      }
      }

    Please try posting your code snippet between backticks.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Navigation Not Updating’ is closed to new replies.