• Hi.
    I’m having a bit of trouble on a family blog site I made. It can be found at jimcallaghan.com

    To the bottom right, in the sideblock menus, the PAGES link is not displayed properly. You can see that the CSS has not applied properly to the PAGES text and has left a stray ‘>’ visible on the screen. I downloaded a fresh copy of the theme and uploaded – same.

    I downloaded a theme called ‘rockwall’ Same problem.
    I changed to a theme called ‘aeros’ and the problem goes away.

    I’m ok with html & css, but the whole php/asp type dynamically created pages are still new to me, so apologies if it appears I’ve asked a dumb question. I have searched the forums, but only for 20 mins or so.

    Thanks a million in advance of any assistance.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi

    When I did a view source of your page, below is the sidebar section for pagesYou can see a double “>” character in the <div class="sideblock">> line

    This code is probably in sidebar.php. Sometimes, if their is a PHP code section embedded within HTML, an extra “>” character accidently gets introduced. You will need to do some detective work to see WHERE its coming from, but that is the root of your problem.

    Hope you find this helpful

    <h3>Pages</h3>
    <div class="sideblock">>
       <ul>
    <li class="page_item"><a href="https://www.jimcallaghan.com">Home</a></li>
    
    <li class="page_item page-item-2"><a href="https://www.jimcallaghan.com/?page_id=2" title="About">About</a></li>
    <li class="page_item page-item-5"><a href="https://www.jimcallaghan.com/?page_id=5" title="Photos">Photos</a></li>
    <li class="page_item page-item-109"><a href="https://www.jimcallaghan.com/?page_id=109" title="PHP SandPit">PHP SandPit</a></li>
    <li class="page_item page-item-107"><a href="https://www.jimcallaghan.com/?page_id=107" title="Social Networks">Social Networks</a></li>
    
     </ul>
    Thread Starter jimcallaghan

    (@jimcallaghan)

    Thanks fopr the response, I’ll take a look. Seems odd that, as each theme has its own sidebar.php page so unlikely that two themes would both get the same problem. Of course, the view source you are seeing is generated dynamically. As a result, the html created is not the same as the local files that are uploaded.

    here’s the source of the sidebar.php page before it’s uploaded to server.

    <div id=”sidebar-wrapper”>
    <div id=”sidebar”>
    <?php if ( !function_exists(‘dynamic_sidebar’)
    || !dynamic_sidebar() ) : ?>

    <?php
    $today = current_time(‘mysql’, 1);
    if ( $recentposts = $wpdb->get_results(“SELECT ID, post_title FROM $wpdb->posts WHERE post_status = ‘publish’ AND post_date_gmt < ‘$today’ ORDER BY post_date DESC LIMIT 10”)):?>
    <div class=”sideblock”>
    <h3><?php _e(“Recent Posts”); ?></h3>

      <?php
      foreach ($recentposts as $post) {
      if ($post->post_title == ”)
      $post->post_title = sprintf(__(‘Post #%s’), $post->ID);
      echo ”

    • ID).”‘>”;
      the_title();
      echo ‘
    • ‘;
      }?>

    </div>
    <?php endif; ?>
    <?php if (function_exists(‘wp_theme_switcher’)) { ?>
    <div class=”sideblock”>
    <h3>Themes</h3>
    <?php wp_theme_switcher(‘dropdown’); ?>
    </div>
    <?php } ?>
    <div class=”sideblock”>
    <h3>Categories</h3>

      <?php wp_list_cats(‘sort_column=name&hierarchical=0’); ?>

    </div>
    <div class=”sideblock”>
    <h3>Archives</h3>

      <?php wp_get_archives(‘type=monthly’); ?>

    </div>
    <div class=”sideblock”>
    <h3><?php _e(‘Blogroll’); ?></h3>

      <?php get_links(-1, ‘

    • ‘, ‘
    • ‘, ”, FALSE, ‘name’, FALSE, FALSE, -1, FALSE); ?>

    </div>
    <div class=”sideblock”>
    <h3>Search</h3>

    • <form method=”get” id=”searchform” action=”<?php echo $_SERVER[‘PHP_SELF’]; ?>”>
      <input type=”text” value=”<?php echo wp_specialchars($s, 1); ?>” name=”s” id=”s” /><input type=”submit” id=”sidebarsubmit” value=”Search” />
      </form>

    </div>
    <div class=”sideblock”>
    <h3><?php _e(‘Meta:’); ?></h3>

    </div>
    <?php endif; ?>
    </div>
    </div>
    </div>

    Hi

    The code you pasted in does not match what is being displayed in the sidebar on your site. I suspect you are looking at the wrong file of code.

    Thread Starter jimcallaghan

    (@jimcallaghan)

    It was within functions.php

    The default downloaded code within the theme, that generated the sidebars was not in sideblock.php (as one may assume) but within functions.php

    What was:
    ‘<h3><?php _e(‘Pages’); ?></h3>
    <div class=”sideblock”>

      <li class=”page_item”>“>Home
      <?php wp_list_pages(‘title_li=’); ?>

    </div>’

    became:
    ‘<div class=”sideblock”><h3><?php _e(‘Pages’); ?></h3>

      <li class=”page_item”>“>Home
      <?php wp_list_pages(‘title_li=’); ?>

    </div>’

    by placing the <h3> tag within the <div> it placed the text correctly, and applied the css to the text. The >> was also within here so took one of them out. Resolved.

    Thanks for your efforts ‘stvwlf’ – much appreciated.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Sideblock Pages link not displayed properly’ is closed to new replies.