WordPress.org

Ready to get started?Download WordPress

Forums

Help with Semiologic CMS (5 posts)

  1. chrisgee
    Member
    Posted 8 years ago #

    I'm trying to build a CMS for a site using Semiologic and what I'd like to do is display a sidebar showing recent posts only on the "Blog" page but on the Pages, I don't want to show the sidebar.

    Unfortunately, I don't see any code in the theme pages where you can modify the code to remove the sidebar.

    Anyone have any ideas?

    Thanks!

  2. Denis de Bernardy
    Member
    Posted 8 years ago #

    in header.php, add a test before inserting sidebar.php, i.e

    if (!is_page())
    {
    # require sidebar
    }

  3. chrisgee
    Member
    Posted 8 years ago #

    That's the problem. Nowhere in my header.php file does it reference sidebar.php.

    Here is the code below for header.php:

    -----------------

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><br />
    <html xmlns="http://www.w3.org/1999/xhtml"><br />
    <head profile="http://gmpg.org/xfn/11"><br />
    <title><?php if ( function_exists('sem_page_title') ) sem_page_title(); ?></title><br />
    <meta http-equiv="Content-Type" content="text/html; charset=<?php bloginfo('charset'); ?>" /><br />
    <meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> <!-- leave this for stats --><br />
    <?php if( $_REQUEST['print'] ) : ?><br />
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/print.css" type="text/css" media="all" /><br />
    <meta name="robots" content="noindex, nofollow"><br />
    <?php else : ?><br />
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="all" /><br />
    <link rel="alternate" type="application/rss+xml" title="<?php _e('RSS feed'); ?>" href="<?php bloginfo('rss2_url'); ?>" /><br />
    <link rel="alternate" type="application/rss+xml" title="<?php _e('Comments RSS feed'); ?>" href="<?php bloginfo('comments_rss2_url'); ?>" /><br />
    <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" /><br />
    <script type="text/javascript"><br />
    function sem_check_url( the_url )<br />
    {<br />
    if ( the_url &&amp; the_url.indexOf( '://' ) == -1 )<br />
    return 'http://' + the_url;<br />
    else<br />
    return the_url;<br />
    }<br />
    </script><br />
    <?php endif; ?><br />
    <?php wp_head(); ?><br />
    </head><br />
    <body><br />
    <?php if ( $_REQUEST['print'] ) : ?><br />
    <div id="main"><br />
    <?php else : ?><br />
    <table id="header" class="canvas"><br />
    <tr><br />
    <td id="admin_menu" align="right"><br />
    <?php if ( function_exists('sem_admin_menu') ) sem_admin_menu(); ?><br />
    </td><br />
    </tr><br />
    <tr><br />
    <td id="tagline"><br />
    <h1><a>"><?php bloginfo('name'); ?></a></h1><br />
    <h2><?php bloginfo('description'); ?></h2><br />
    </td><br />
    </tr><br />
    </table><br />
    <table id="navbar" class="canvas"><br />
    <tr><br />
    <td id="header_nav" align="left"><br />
    <?php if ( function_exists('sem_header_nav') ) sem_header_nav(); ?><br />
    </td><br />
    </tr><br />
    <tr><br />
    <td id="search" align="right"><br />
    <?php if ( function_exists('sem_search_form') ) sem_search_form(); ?><br />
    </td><br />
    </tr><br />
    </table><br />
    <table id="body" class="canvas"><br />
    <tr valign="top" align="left"><br />
    <td id="main"><br />
    <?php endif; ?>

  4. Denis de Bernardy
    Member
    Posted 8 years ago #

    it's in footer.php

  5. chrisgee
    Member
    Posted 8 years ago #

    Cool! That worked, thanks!

    Now the only thing is that it doesn't work on the home page, which is designated with your "Static Home" plugin.

    Any ideas?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.