Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • I know this post is kinda old but I came across this issue with a theme I am using and resolved it as follows:

    Original theme code:

    posts_nav_link(' · ', __('Next entries »'), __('« Previous entries'));

    New Code:

    posts_nav_link('', '', __('« Previous entries'));
    posts_nav_link(' · ', '', '');
    posts_nav_link('', __('Next entries »'), '');

    Using blanks for the text allows you to put the links in the order you want.

    Hope this helps.

    I found this code in my index.php file under my current theme (wp-content\themes\themename\index.php):

    <p class="postmetadata">Posted in
    <?php the_category(', ') ?>
    |
    <?php edit_post_link('Edit', '', ' | '); ?>
    <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?>
    </p>

    If I comment that code out like this:

    <!-- <p class="postmetadata">Posted in
    <?php the_category(', ') ?>
    |
    <?php edit_post_link('Edit', '', ' | '); ?>
    <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?>
    </p> -->

    I no longer get Posted by, edit, or comments text at the bottom of my posts. Hope that helps

    Not sure if this is exactly what you were trying to do, but I wrote some code that will display the top level page tree no matter how many levels down you go. Basicly it check if parent is 0, if it isn’t go up a page until parent is 0, then send that page’s ID to the wp_list_pages function.

    <?php //if current post's parent is not 0, track back up the chain until parent is zero
    //then use that as the value passed in for child_of
    $emp_parent_post = 1;
    $emp_testingpage = $post->ID;
    //print $emp_testingpage." ";
    while ($emp_parent_post <> 0){
    $emp_parent_post = $wpdb->get_var("SELECT post_parent FROM $wpdb->posts WHERE ID = $emp_testingpage");
    //print $emp_parent_post." ";
    if ($emp_parent_post <> 0) $emp_testingpage = $emp_parent_post;
    //print $emp_testingpage." ";
    }
    ?>
    <?php wp_list_pages('title_li=<h2>Sub-Pages</h2>&child_of='.$emp_testingpage); ?>

    So no matter how many layers deep you go, it will alway display the top level tree with all childern.

Viewing 3 replies - 1 through 3 (of 3 total)