WordPress.org

Support

Support » How-To and Troubleshooting » Permalinks again!

Permalinks again!

  • I have permalink woes, have scoured the forums and everywhere else but just can’t seem to put my finger on the issue. I have gathered some hopefully useful information and still feel this is a simple issue. Please help if you can!

    If I change the permalink structure through Settings and choose say “/%year%/%monthnum%/%postname%/” then what I get is the correct structure showing in the address bar but where ever I click I just get my main blog page. So when I click “About” this shows “http://www.larkrise.net/about/” in the address bar but the content shows “http://www.larkrise.net/”.

    I have installed AskApache RewriteRules Viewer 3.0 and it shows me:
    > Permalink: /%year%/%monthnum%/%postname%/
    > Writable .htaccess file found
    > mod_rewrite found
    > Not using pathinfo style index permalinks
    > Using mod_rewrite permalinks

    The WordPress Generated .htaccess Rules are:
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    …and I have a further list of tons of WordPress RewriteRules.

    So, can anyone help me to sort this out?!

Viewing 15 replies - 1 through 15 (of 32 total)
  • Have a look at your template to see what the actual link is – it may be hardcoded into the sidebar.php file (as is common practice with new themes)

    @hotkee thanks for your interest and the suggestion; this is a new theme (though I did not have a non-default structure before installing it). Could you guide me as to what to look for in sidebar.php and what to do about it?

    @hotkee, just starting to feel a glimmer of excitement over this! My sidebar.php looks like this (first bit at any rate):

    <div id=”Sidebar”>
    <div id=”Sidebar-in”>
    <?php if ( !function_exists(‘dynamic_sidebar’) || !dynamic_sidebar() ) : ?>
    <?php /* Creates a menu for pages beneath the level of the current page – Thanks K2 Theme*/
    if (is_page() and ($notfound != ‘1’)) {
    $current_page = $post->ID;
    while($current_page) {
    $page_query = $wpdb->get_row(“SELECT ID, post_title, post_status, post_parent FROM $wpdb->posts WHERE ID = ‘$current_page'”);
    $current_page = $page_query->post_parent;
    }
    $parent_id = $page_query->ID;
    $parent_title = $page_query->post_title;

    if ($wpdb->get_results(“SELECT * FROM $wpdb->posts WHERE post_parent = ‘$parent_id’ AND post_status != ‘attachment'”)) { ?>

    whats the site url?

    Ok on the site now you have default permalinks which work, yes?

    Change them to the permalink you say doesnt work.

    @hotkee done (thanks)

    your permalink structure is just /%postname%/ ?
    change it to /%year%/%monthnum%/%day%/%postname%/

    or is it set to /%year%/%monthnum%/%day%/%postname%/ and its not coming up?

    @hotkee it is set to /%year%/%monthnum%/%day%/%postname%/

    Well it looks like a buggy theme – and from what I can tell its one you have paid for.

    Does the site work ok when the theme selected is default wordpress one?

    If it does, then you have a right to expect the theme developer to support you on this.

    In meantime, you could paste the whole sidebar.php code for people to look here if you want. The bit you pasted is not enough

    Can you also check that the date timestamp field for your pages is populated, say for the About page.

    OK, the full sidebar.php is below. I have contacted the theme supplier (yes, I did pay for this) & he assured me that this was not a theme issue! I tried a default WordPress theme but did have the same issue.

    <div id="Sidebar">
      <div id="Sidebar-in">
        <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>
        <?php /* Creates a menu for pages beneath the level of the current page - Thanks K2 Theme*/
    		if (is_page() and ($notfound != '1')) {
    			$current_page = $post->ID;
    			while($current_page) {
    				$page_query = $wpdb->get_row("SELECT ID, post_title, post_status, post_parent FROM $wpdb->posts WHERE ID = '$current_page'");
    				$current_page = $page_query->post_parent;
    			}
    			$parent_id = $page_query->ID;
    			$parent_title = $page_query->post_title;
    
    			if ($wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_parent = '$parent_id' AND post_status != 'attachment'")) { ?>
    
    	<!-- list Sub Pages-->
        <h2><?php echo $parent_title; ?> <?php _e('Subpages','k2_domain'); ?></h2>
    
    <ul>
          <?php wp_list_pages('sort_column=menu_order&title_li=&child_of='. $parent_id); ?>
        </ul>
        <?php } } ?>
    
    	<!-- list Categories-->
        <h2><?php _e('Categories'); ?></h2>
    
    <ul>
          <?php wp_list_cats('sort_column=name&optioncount=1&hierarchical=0'); ?>
        </ul>
    	<!-- list Archives -->
        <h2><?php _e('Archives'); ?></h2>
    
    <ul>
          <?php wp_get_archives('type=monthly'); ?>
        </ul>
    <script type="text/javascript" src="http://twitter.com/javascripts/blogger.js"></script>
    <script type="text/javascript" src="http://twitter.com/statuses/user_timeline/larkrise.json?callback=twitterCallback2&count=5"></script>
    <div id="twitter_div">
    <h2 class="twitter-title">Twitter Updates</h2>
    <ul id="twitter_update_list">
    </div>
    
        <?php endif; ?>
      </div><!-- end #sidebar-in -->
    </div><!-- end #Sidebar -->

    Are you using any widgets?

    What I mean is are you going to Design -> Widgets in the admin screen and creating any widgets.

    By the looks of the sidebar code, it never gets executed instead widgets are being used I think.

    If you have the following plugin Sidebar Widgets installed, disable it and then try your site.

    I have the following Widgits in use: Pages, Recent Comments, two Text widgits (Do you want to stay, and Twitter) and Links. No I do not have the Sidebar Widgets plugin installed.

    Remove the widgets and try.

Viewing 15 replies - 1 through 15 (of 32 total)
  • The topic ‘Permalinks again!’ is closed to new replies.