WordPress.org

Ready to get started?Download WordPress

Forums

static text in specific categories (5 posts)

  1. Rob Poitras
    Member
    Posted 9 years ago #

    Under certain sections I want to have text at the top. It wont change that often.
    I know there is the adhesive mod. But I dont want it to be a post. Just some simple html at the top of the page.

    ideas?

  2. Kafkaesqui

    Posted 9 years ago #

    Just write it into your index template? You can use a PHP if/else statement to evaluate when the text will appear, but your mention of "certain sections" is a little vague to suggest anything more.

  3. yokima
    Member
    Posted 9 years ago #

    1. Category specific coding inside the loop

    I believe I have a similar question. I want to introduce this IF statement:

    <?php if (the_category_ID(false)==33) { ?>
    category specific HTML code
    <? } >

    I put this inside the loop. And it doesn't seem to work. What would be the right statement?

    2. category specific coding outside the loop.

    I would also like to change the menu bar's content according to how the index.php is being queried, so the menu bar will show one thing if index.php?cat=31 and another if ?cat=32 (if I could get to the category permalinks, the better)

    how do I do that?

  4. yokima
    Member
    Posted 9 years ago #

    1. Category specific coding inside the loop

    I believe I have a similar question. I want to introduce this IF statement:

    <?php if (the_category_ID(false)==33) { ?>
    category specific HTML code
    <? } >

    I put this inside the loop. And it doesn't seem to work. What would be the right statement?

    2. category specific coding outside the loop.

    I would also like to change the menu bar's content according to how the index.php is being queried, so the menu bar will show one thing if index.php?cat=31 and another if ?cat=32 (if I could get to the category permalinks, the better)

    how do I do that?

  5. Phoat
    Member
    Posted 9 years ago #

    check the codex pages about The Loop for an example of what you are talking about. http://codex.wordpress.org/The_Loop

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.