WordPress.org

Ready to get started?Download WordPress

Forums

code for excluding pages in blix header (7 posts)

  1. TomJohnson
    Member
    Posted 8 years ago #

    I am excluding category pages in my Blix header using the following:
    elseif ( $page_id==70) { /* ignore */ }
    elseif ( $page_id==71) { /* ignore */ }
    elseif ( $page_id==72) { /* ignore */ }
    elseif ( $page_id==73) { /* ignore */ }
    elseif ( $page_id==74) { /* ignore */ }
    elseif ( $page_id==75) { /* ignore */ }
    elseif ( $page_id==76) { /* ignore */ }
    elseif ( $page_id==77) { /* ignore */ }
    elseif ( $page_id==78) { /* ignore */ }
    elseif ( $page_id==79) { /* ignore */ }
    elseif ( $page_id==80) { /* ignore */ }
    elseif ( $page_id==86) { /* ignore */ }
    elseif ( $page_id==94) { /* ignore */ }
    elseif ( $page_id==118) { /* ignore */ }

    I know this is silly -- how do I squish all this in one line so I don't have to repeat it a zillion times?

  2. WarAxe
    Member
    Posted 8 years ago #

    What does the permalink for a category page look like?

  3. TomJohnson
    Member
    Posted 8 years ago #

  4. WarAxe
    Member
    Posted 8 years ago #

    Ok. You'll have to go into the BX_functions.php file and change the SQL string that gets the pages, I think.

    Actually... perhaps I'm not understanding what you are trying to do. Have you made a seperate page for every category? They all look the same to me.

  5. TomJohnson
    Member
    Posted 8 years ago #

    no, I haven't made separate pages for each category. how do I do that?

  6. WarAxe
    Member
    Posted 8 years ago #

    You shouldn't have to. Blix will only load pages... not postes. Unless what you are saying is that you have a bunch of pages that are subpages of some higher parent page? Because pages don't have a category. I don't mean to be insulting... you never know the skill level of people on here... but do you understand the distinction between postes and pages? This may clear it up for you when you do.

  7. TomJohnson
    Member
    Posted 8 years ago #

    I must have miscommunicated -- I meant to ask how I exclude certain categories from my header, not pages. If you look at my site, the header's buttons are categories. However, now I have a new problem: by excluding categories from the header, the optioncount tag for the sidebar categories no longer functions -- it just counts them all as zero posts.

    When I excluded my categories, perhaps I did it wrong. Is there a way to choose to include only certain categories, rather than saying get_wp_cats and then specifying which ones to exclude? I'd rather say get this cat only, or something.

Topic Closed

This topic has been closed to new replies.

About this Topic