WordPress.org

Support

Support » How-To and Troubleshooting » static text in specific categories

static text in specific categories

  • 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?

Viewing 4 replies - 1 through 4 (of 4 total)
  • 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.

    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?

    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?

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘static text in specific categories’ is closed to new replies.
Skip to toolbar