Support » How-To and Troubleshooting » Php file messing with wordpress loop.

Php file messing with wordpress loop.

  • ok, I know for sure that something in this code is messing with my single post loop. could someone please look it over and diagnose any problems? Thank you. [code]<!– begin sidebar –>

    <div id=”sidebar”>

    <ul id=”sidebarwidgeted”>
    <?php if ( function_exists(‘dynamic_sidebar’) && dynamic_sidebar(1) ) : else : ?>

    <li id=”Search”>
    <form method=”get” id=”search_form” action=”<?php bloginfo(‘home’); ?>/”>
    <input type=”text” class=”search_input” value=”To search, type and hit enter” name=”s” id=”s” onfocus=”if (this.value == ‘To search, type and hit enter’) {this.value = ”;}” onblur=”if (this.value == ”) {this.value = ‘To search, type and hit enter’;}”/>
    <input type=”hidden” id=”searchsubmit” value=”Search” /></form>

    <li id=”About”>
    <h2>About the Author</h2>
    <p>A young entrepreneur ranting, promoting, and discussing what interests him.</p>

    <?php if (is_single()) {
    if (get_the_category()) {
    foreach((get_the_category()) as $category) {
    echo ‘<h2>Related Articles</h2>’.”\r\n

  • “;
    while (have_posts()) {

    echo “

  • \r\n”;
    } ?> <?php endif; ?>
    <li id=”Recent”>
    <h2>Recent Articles</h2>

      <?php get_archives(‘postbypost’, 10); ?>

    <li id=”Categories”>

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

    <li id=”Archives”>

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

    <!– end sidebar –>[/code]

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Php file messing with wordpress loop.’ is closed to new replies.
Skip to toolbar