Support » Fixing WordPress » Permalinks and static front page

  • Hello,

    I’ve developed a website using WordPress as a CMS (see . The front page is static and the posts page is the link in the sidebar titled “CSI: CONTROL SYSTEM INVESTIGATOR”.

    When I turn on custom permalinks (day and name) the pages work fine, but the posts page is funky.

    If you click on the posts page (CSI) directly from the front page it’s fine, except instead of having the pretty permalinks it looks like this:

    However, if you click on a static page first, say, CAREERS, and then click on CSI, the URL appends “?page_id=96” to “careers” like so:, and this causes the page to 404. All links clicked after this are funky.

    Permalinks work fine if I use the default theme, so it’s something with my theme, but I’m at a loss as to where to look or search. Is it something to do with making the front page static and putting the posts on an internal page?

    Any solutions or ideas are much appreciated!

    Thanks in advance,


Viewing 6 replies - 1 through 6 (of 6 total)
  • esmi


    Forum Moderator

    Sounds more like it’s a problem with the sidebar. What are you using to generate the CSI link in the sidebar?

    This is the html for the CSI link in the sidebar:

    <h2><a href="index.php?page_id=96">CSI: CONTROL SYSTEM INVESTIGATOR</a></h2>

    If it makes any difference, I’m calling in custom sidebars for various static pages with conditional statements in index.php (outside the loop):

    if ( is_front_page() ) :
    elseif ( is_page('77') ) :
    	include (TEMPLATEPATH . '/sidebar_about.php');
    elseif ( is_page('96') ) :
    	include (TEMPLATEPATH . '/sidebar_csi.php');
    elseif ( is_page('101') ) :
    	include (TEMPLATEPATH . '/sidebar_furnace.php');
    elseif ( is_page('103') ) :
    	include (TEMPLATEPATH . '/sidebar_control.php');
    elseif ( is_page('105') ) :
    	include (TEMPLATEPATH . '/sidebar_control.php');
    elseif ( is_page('107') ) :
    	include (TEMPLATEPATH . '/sidebar_daq.php');
    elseif ( is_page('94') ) :
    	include (TEMPLATEPATH . '/sidebar_bob.php');
    elseif ( is_page('342') ) :
    	include (TEMPLATEPATH . '/sidebar_save.php');
    else :
    	include (TEMPLATEPATH . '/sidebar_interior.php');

    I’m on a Linux server with Apache mod_rewrite enabled. The .htaccess file is in the WordPress root folder (should it be in the theme directory?) Permalinks work fine with the default theme, so I think .htaccess is okay, but here’s the code:

    AddHandler application/x-httpd-php5 .php5 .php4 .php .php3 .php2 .phtml
    AddType application/x-httpd-php5 .php5 .php4 .php .php3 .php2 .phtml
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    # END WordPress
    AuthName "Restricted Area"
    AuthUserFile "/home/ameri231/.htpasswds/public_html/passwd"

    Thanks for your help!


    Note: I’m working on the site right now, so you may not be able to see it, or it might behave oddly (this is a testing site at the moment).



    Forum Moderator

    The .htaccess looks fine. What’s in sidebar_csi.php?

    See code below for sidebar_csi.php. Also, since the site has now gone live I’ve turned off the permalinks until I resolve this issue, but you can see the site sans permalinks at



    <div id="sidebar">
        <?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar() ) : else : ?>
        <div class="csi-leadin2">
    <h2><a href="index.php?page_id=94">FEATURED PROJECT</a></h2>
        <div class="csi-leadin2">
    <h2><a href="index.php?page_id=96">CSI: CONTROL SYSTEM INVESTIGATOR</a></h2>
           <div id="search">
    		<form role="search" method="get" id="searchform" action="" >
    	<label class="screen-reader-text" for="s"></label>
    	<input type="text" value="" name="s" id="s" />
    	<input type="submit" id="searchsubmit" value="Search" />
    <ul id="sidebarnav">
    <li><h3><a href="index.php?page_id=101">FURNACES AND OVENS</a></h3></li>
    <li><h3><a href="index.php?page_id=103">CONTROL SYSTEMS</a></h3></li>
    <li><h3><a href="index.php?page_id=105">MUNICIPAL WATER</a></h3></li>
    <li><h3><a href="index.php?page_id=107">DATA ACQUISITION SYSTEMS</a></h3></li>
    <li><h3><a href="index.php?page_id=242">ROBOTICS &AMP; MOTION</a></h3></li>
    <ul id="sidebarnav">
    <li><h3><a href="index.php?page_id=109">CONTROL ENGINEER</a></h3></li>
    <!--<li><h3><a href="index.php?page_id=111">ELECTRICAL ENGINEER</a></h3></li>
    <li><h3><a href="index.php?page_id=113">ELECTRICAL DESIGNER</a></h3></li>-->
    <img id="logos" src="" width="180" height="101" alt="We're liscensed distributers for Allen-Bradley, Eurotherm Chessell and Siemens">
        <?php endif; ?>
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Permalinks and static front page’ is closed to new replies.