Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other WordPress…no sidebars…’sidebar’ for each post?

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #23757

    I want to put together a WordPress theme where I don’t use the traditional sidebar but rather give each post it’s own ‘sidebar’ where I put links related to that particular post. Anyone know how to do this? Has it been done elsewhere?

    #52104
    Toby Pitman
    Participant

    A quick google search for ‘related posts widget’ should sort you out. Here’s one…

    http://wordpress.org/extend/plugins/yet-another-related-posts-plugin/

    You’ll need to create an extra sidebar module to use the widget only in single.php. Here’s the easy way….

    Add this to your functions.php file.

    Code:
    if ( function_exists(‘register_sidebar’) )
    register_sidebar(array(‘name’=>’related’,
    ‘before_widget’ => ‘

  • ‘,
    ‘after_widget’ => ‘
  • ‘,
    ‘before_title’ => ‘

    ‘,
    ‘after_title’ => ‘

    ‘,
    ));

then add this to single.php where you want the widget to appear.

Code:

Choose ‘related’ from the drop down menu in Themes->Appearance->Widgets and add the ‘related posts’ widget to that sidebar module.

Sorted!

Viewing 2 posts - 1 through 2 (of 2 total)