Forum Replies Created

Viewing 7 replies - 16 through 22 (of 22 total)
  • Yep, is_home() doesnt seem to work when home is set to a static page. I tested this on 2.2

    This is most likely being caused by a nesting problem with the themes div tags. One of your <div>s is probably not being closed in the right place.

    I don’t believe WordPress supports RSS feeds for pages. Only posts.

    -Aaron

    Glad you got it working.

    No problem. I’m glad things are working for you know. Congrats on the killer domain too. . .I’ve often wondered how much free traffic domains that people may be using as an example of a domain get. I guess yoursite.com would be better, but mysite.com is still pretty killer.

    Totally a stab in the dark, but . . .
    1.By default I believe the WordPress htaccess file feeds all urls into index.php as shown by this line in the htaccess file

    RewriteRule . /index.php [L]

    If you are redirecting index.php to domain then wordpress may be trying to send it back to index.php causing the loop.

    2. Perhaps your permalink settings (or .htaccess file) in WordPress are causing /blog to looked up as a post or page instead of an existing file or folder. Your .htaccess file should have

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d

    which tells apache to only rewrite /urls that are not aleady existing as files (-f) or directories(-d).

    3.I believe since 2.3 wordpress has offered built in redirection of www to non-www or vice-versa. This is setup in your Settings.

    Your blog address and wordpress address should probably be different.

    WordPress Address: https://www.mysite.com/blog
    Blog Address: https://www.mysite.com/blog (using a www or not here will effect how WordPress redirects requests).

    Hope that helps.

    Aaron
    WPCast.com (coming soon)

    Here is one solution for your sidebar. It should work for most themes and situations. There are some limitations of this method mostly having to do with it not rewinding the post counter on multi-loop pages.

    Just stick the code in the sidebar, change the number of posts per category displayed and give it a shot. There are other ways to accomplish this and some different ways of handling multiple categories but this should give you a good start:

    //if on single page
    if ( is_single() ) :
    //setup post data
    global $post;
    //get the category(s) of current post
    $categories = get_the_category();
    //loop through each category the post belongs too
    foreach ($categories as $category) :
    ?>
    //print category title
    <li class="sidebar_links">
    <h2>Recent <?php echo $category->name; ?> Posts</h2>
    
    <ul>
    <?php
    //how many other posts from each of the current posts category
    $posts = get_posts('numberposts=5&category='. $category->term_id);
    //loop through posts
    foreach($posts as $post) :
    ?>
    
    //print post links
    <li>
    <a href="<?php the_permalink(); ?>" class="sidebar_link"><?php the_title(); ?>
    </a>
    </li>
    //end posts loop
    <?php endforeach; ?>
    </ul>
    
    </li>
    <?php
    //end categories loop
    endforeach; endif ; ?>

    -Aaron
    wpcast.com (coming soon)

Viewing 7 replies - 16 through 22 (of 22 total)