WordPress.org

Ready to get started?Download WordPress

Forums

Forcing a non-page to be displayed singlecol (2 posts)

  1. finn_redkanga
    Member
    Posted 9 years ago #

    I'm trying to integrate the flickr gallery plugin into my website and after getting the plugin to work, I've gotten the template page to display properly. The problem is, when you click on one of the gallery links (really flickr sets) you don't get a singlecol page because header.php doesn't think it should be a singlecol page. I know that the offending code is:


    <div id="container"<?php if ( is_page() && !is_page("archives") ) echo " class=\"singlecol\""; ?>>

    But after trying a couple things, I'm at a loss as to how to fix it...

  2. finn_redkanga
    Member
    Posted 9 years ago #

    to answer my own question, I finally got the evaluation to work as I expected.
    I got all my parenthesis in the right places, used a perl regex match, and wham! it works:

    <div id="container" <?php if ( ((preg_match('/gallery/',$_SERVER['PHP_SELF'])) || is_page()) && !is_page("archives") ) echo " class=\"singlecol\""; ?>>

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags