Wordpress sidebar hack

I finally got everything working on my site but the thing that bugs me is the sidebar on the gallery page.

I went to the wordpress forums, and found some help, edit the loop. But it only fixes the main gallery page. As soon as I go to the album page or the image page the homepage sidebar returns.

Any suggestions would be appreciated.

Thanks
-Richard

Comments

  • Not sure what method you used but the only files you should need to edit are both zenphoto(index.php and image.php)
    index.php should look like this

    `<?php <br />
    /* Start Wordpress */

    define('WP_USE_THEMES', false);

    require('../wp-blog-header.php');

    require_once("zen/template-functions.php");

    //Get Header */

    get_header();

    //Get Sidebar

    //get_sidebar();

    /* Start zenphoto */

    $themepath = 'themes';

    $theme = $_zp_gallery->getCurrentTheme();

    $_zp_themeroot = WEBPATH . "/$themepath/$theme";

    if (in_context(ZP_IMAGE)) {

    include("$themepath/$theme/image.php");

    } else if (in_context(ZP_ALBUM)) {

    include("$themepath/$theme/album.php");

    } else if (in_context(ZP_INDEX)) {

    include("$themepath/$theme/index.php");

    }

    //Get Footer

    get_footer();

    ?>`

    and under image.php in your theme directory replace isset($error) with $FIXME

    This way if you want to add the sidebar.. you just uncomment infront of the get_sidebar() line and if you dont want it either comment it out or remove the line.

    This is how I have it on my site.. I use the sidebar but as a test i commented out the line and I dont receive the sidebar in any of my pages so this method should work for you. It has worked for me from ZP0.8b and WP 1.5 all the way up to current.
  • qtrc Member
    Thanks for quick reply Chilifrei64. If you look at my website

    www.web804.net/gallery/

    I would like to change the sidebar to display a discription of the album ala

    http://www.noscope.com/photography/

    I don't want to completely remove it, I would like to replace the sidebar with the album discription.

    Any suggestion? Maybe pointing me to the right direction?

    Thanks,
    -Richard
Sign In or Register to comment.