Support » Fixing WordPress » Static Front Codex, calling up posts from whtin a page.

  • I have Static Front Page enabled. My home page, “Home” is showing up just fine. I’m calling up my posts in a page called “Design Notes” using the method described here:

    http://codex.wordpress.org/Pages#Making_your_blog_appear_in_a_non-root_folder

    <?php
    /*
    Template Name: Design Notes
    */
    ?>

    <?php query_posts('cat=-0'); //gets all posts
    load_template( TEMPLATEPATH . '/index.php'); //loads index
    ?>

    That’s controlling the posts to be called into my “Design Notes” page. My problem is, when I click the “Design Notes” page in my menu, “Home” is highlighted, not “Design Notes.”

    I believe this to be because the code is calling up index.php which defaults to highlighting home as the page being viewed?

    Also, my “Home” page shows the “Lastest” and “About” information while my other pages don’t, except Design Notes. I’m guessing again that that’s because index.php is calling up specifics for the sidebar?

    I’m still new at this so I’m not exactly sure where to begin to iron out these issues.

Viewing 4 replies - 1 through 4 (of 4 total)
  • “Home” is highlighted? Can you include the code of your header so we can look at the conditional statements you’re using to create a highlighted menu? Use a pastebin or something, don’t dump all that code here. Do the same for your sidebar content. This sounds like a problem with Conditional Tags. Here’s more:
    http://codex.wordpress.org/Conditional_Tags

    Your other option is to make a opy of index.php and call it design.php. Then, in the code for your Design Notes page, make that a reference to design.php instead of index.php (that load_template part).

    Thread Starter Jenkin

    (@jenkin)

    Here’s my header: http://pastebin.ca/137874

    Here’s my sidebar: http://pastebin.ca/137875

    I haven’t edited the sidebar at all. So far, all I’ve done is modify the header to rename my home tab as “Home” instead of “Blog”

    Using K2 as my bass template.

    I’ve done what you suggested and used my “Design Notes” page to call up posts.php, which is a copy of my index.php.

    I understand that this will let me edit posts.php and have it not goof up my home page, correct?

    Thanks!

    Correct. Your home page is index.php and, if you aren’t editing that file, any changes you make elsewhere shouldn’t have an effect on your home page. Does that fix anything? I haven’t looked through any of your code, yet.

    Thread Starter Jenkin

    (@jenkin)

    The problem I’m having is that my posts.php (copy of index.php) looks like this:

    <?php get_header(); ?>
    <div class="content">

    <div class="primary">
    <?php include (TEMPLATEPATH . '/theloop.php'); ?>
    </div>
    <?php get_sidebar(); ?>

    </div>
    <?php get_footer(); ?>

    So there’s obviously not much I can change in posts.php to fix this header highlight issue. I’m leery of messing around with the header highlights without knowing much more than I do.

    There’s got to be a reason for “Home” being highlighted when I click “Design Notes” because i’m calling a copy of the index, which somehow makes “Home” the default page that’s highlited. I should mention here, too, that I’m using Static Front Page.

    Now, the site is functional, when I click the “Design Notes” page, it brings up my loop and everything displays properly. Everything but the page highlight.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Static Front Codex, calling up posts from whtin a page.’ is closed to new replies.