WordPress.org

Ready to get started?Download WordPress

Forums

Domain and index.php ... showing something different... (2 posts)

  1. jabbamonkey
    Member
    Posted 1 year ago #

    Ok. having a problem ...

    If I go to...
    http://ridgewood.tipsfromtown.com/
    ... then you will see NO RIGHT COLUMN

    But it you go to http://ridgewood.tipsfromtown.com/index.php ...
    Then you see a RIGHT COLUMN.

    in my page.php (which is the default template page), I have the following...

    <?php
    // This calls the right column include from page.php
    if( !is_page(array(12641, 'local-deals', 'Local Deals')) && !is_page(array(7645, 'calendar', 'Calendar of Events')) ) {
     	get_template_part('side', 'right');
    }
    // I dont see anything wrong with that...
    ?>

    And side-right.php has the following...

    <?php
    // If It's the homepage, show weather widget.
    // NOTE: The widget appears on
    // ridgewood.tipsfromtown.com/index.php
    // but not ridgewood.tipsfromtown.com/
     if(is_front_page() || is_home()) { ?>
            <!-- weather? -->
            <?php
             // If Weather Plugin (Wunderground) is active ...
             if (is_plugin_active('wunderground/wunderground.php')) {
            ?>
                <div class="right-banners">
                    <?php echo do_shortcode("[forecast]"); ?><br /><br />
                </div>
            <?php
             }
            ?>
    <?php } ?>
    
    // Then NO CONDITIONS. The page should show this ... but it doesn't
         <div class="right-top">Our Friends</div>
    	<div class="right-banners">
            // ...
            // OTHER CODE
            // ...
            </div>
          </div>

    Note ... the index page shows the weather widget, and the OUR FRIENDS. However, the non-index view shows the comments <!-- --> for the weather widget. So, it looks like the code is BREAKING on the weather widget for the non-index page.

    Any idea why?

  2. jabbamonkey
    Member
    Posted 1 year ago #

    If I comment out the "is_plugin_active" reference ... then it works. What is wrong with that line for http://ridgewood.tipsfromtown.com/ but not for http://ridgewood.tipsfromtown.com/index.php ?
    And how do I fix it?

    <?php
    // If Weather Plugin (Wunderground) is active ...
    // if (is_plugin_active('wunderground/wunderground.php')) {
    ?>
    <div class="right-banners">
    <?php echo do_shortcode("[forecast]"); ?>

    </div>
    <?php
    // }
    ?>

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags