treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Recent blog posts displaying page title

  • Hi,

    Am not sure if this is a PHP question but here it goes anyway..

    For some reason my sidebar widget (recent posts) is displaying my page title..
    http://www.leehughes.co.uk/

    if you click some titles then you will see.. I have set the blog up as you can see

    http://www.leehughes.co.uk/blog/

    Now it displays the recent blog posts..

    I have changed no code it my sidebar..

    <div id=\"sidebar\">

    <h2><a href=\"http://feeds.feedburner.com/leehughes\">Subscribe via <img src=\"http://www.leehughes.co.uk/wp-content/uploads/2009/09/feed-icon.gif\" alt=\"feed-icon\" title=\"feed-icon\" width=\"48\" height=\"48\" class=\"aligncenter size-full wp-image-150\" /> </h2>
    <h2><a href=\"http://feedburner.google.com/fb/a/mailverify?uri=leehughes\">Subscribe via email</a> </h2>
    <p><a href=\"http://www.justgiving.com/leehughes-theadventureofalifetime/\">To donate to my cause please click here >></a></p>
    <p><?php /* Widgetized sidebar, if you have the plugin installed. */
    if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>
    <?php get_search_form(); ?></p>

    <h3>Catergories</h3>
    <ul>
    <?php wp_list_categories('show_count=1&title_li'); ?>
    </ul>
    <h3>Archives</h3>
    <ul>
    <?php wp_get_archives('type=monthly'); ?>
    </ul>


    </div>

    <?php endif; ?>

    </div>


    Thanks
  • was there a question???
  • Hi,

    Yeah, sorry..

    Why is this happening?

    I have not changed the code and for some reason this just started to happen.
  • again, sorry, but what is your actual question?

    is it
    On my sidebar, recent posts section, why does my latest post title show in the list?

    I think that is your question, but you have not made it clear......

    although if it is, it is your latest post and your widget is looking for the title of your recent posts, so really it is supposed to do that, my sites with wordpress do that

    also you code shows that if you have the widgets then that should take over from the rest of your php code (or roughly to that account) if you do not want the wigets, you can delete the PHP related to that which should leave your with the categories & archives
  • Hi

    Sorry for the mis understanding..

    Yes my question is why is my recent posts widgets displaying my page title? i have two test blogs on my site http://www.leehughes.co.uk/blog/

    As you can see the widget now displays the recent posts.

    If you go to another page like route.. it just displays the route page link..

    It was that the widget would display my recent blog posts.. so i could go on any page and it would display.. test blog post and another test blog (my blog titles)

    this is not the case anymore.. i was just wondering why


    thanks :)
  • I think it depends on how you have set it up.

    do they all have the same sidebar or different sidebars?

    is you whole site in wordpress or only some parts?
  • Hi,

    My whole site is wordpress.. i have only one file for sidebar (code provided)..