WordPress.org

Ready to get started?Download WordPress

Forums

blog posts and pages - sidebar and navigation questions (3 posts)

  1. ultrus
    Member
    Posted 6 years ago #

    Hello,
    I'm building a WordPress website with mixed blog an page content. The primary/header bar navigation is hard coded in the template, linking to WordPress page IDs (e.g. /?page_id=3), and that variable is used to highlight the active page's header bar image. This seems to be an issue as many secondary and/or primary pages will soon be blog-like sections (not a actual blog, but I want the rss feed ability). There's a blog page as well that features "personal" and "official" categories. Here are the questions as a result of this:

    1. Is there a way to see what the parent "page" of a blog "post" is to use instead of my page_id checking?

    2. Am I correct in that I can split blog post categories, showing only the ones I want in different sections of the site?

    3. When creating a sidebar template for the different website sections, some containing only pages, some full of blog content categories, is there a preferred method of checking what section of the site I'm in, revealing the appropriate sidebar links?

    I haven't had my morning coffee yet so if any of this doesn't make sense, feel free to throw something at me.

    I appreciate the assistance!

  2. drphil9001
    Member
    Posted 6 years ago #

    I am doing the same thing and have two threads on related topics that you should check out here and here.

    You should take a look at query_posts(). That should allow you to filter what posts are retrieved and processed in The Loop. Although, as I mention in the second post above, I am having issues with this method as well.

    I am using a similar header and am using is_page() to determine the "active" page.

    For my sidebar, I have written short methods that test where the user is. I have different sidebars if they are on any "blog" page, Pages that have children, or any other page. Don't know if this is the "preferred" method, but seems to be what is used in various examples in the Codex.

  3. ultrus
    Member
    Posted 6 years ago #

    drphil9001,
    Thanks for the feedback! That gives me more to absorb and play with this evening. I'll post if I come up with something that works. :)

Topic Closed

This topic has been closed to new replies.

About this Topic