• futurepocket

    (@futurepocket)


    Hi,
    This may be simple but I searched around, read some solutions but couldn’t figure it out. I want to add some static text to only ONE of my category pages, e.g., http://futurepocket.com/category/lifestyle/

    I want to add some text to the top of that category before any of the posts are displayed (possibly in a box). If also possible, I want to arrange the posts so they appear beside each other rather than below each other. That’s not the category I want to add the text to, I have yet to create that category, but just wanted to know how I would do that before I made the category. Thanks in advance!

Viewing 7 replies - 1 through 7 (of 7 total)
  • esmi

    (@esmi)

    Thread Starter futurepocket

    (@futurepocket)

    What is “OUTSIDE” the loop, which file? And do we label the name as the category “A” (put name of category in place of A)?

    esmi

    (@esmi)

    What is “OUTSIDE” the loop

    Before (or sometimes, after) The Loop.

    which file?

    category-lifestyle.php

    And do we label the name as the category “A” (put name of category in place of A)?

    Ignore that section. It’s another approach entirely.

    Chip Bennett

    (@chipbennett)

    Since this is such a minor change to the default template, I would modify the category.php template file, rather than creating an entirely separate category-lifestyle.php template file.

    Simply add something like the following:

    if ( is_category( 'lifestyle' ) ) {
         // We are on the lifestyle category archive page; do something
         ?>
         ADD STATIC TEXT/MARKUP HERE
         <?php
    }

    Thread Starter futurepocket

    (@futurepocket)

    Thanks CHIP much appreciated 🙂

    Hello,

    Please can you tell me where you would put that within the category.php file??

    Thanks 🙂

    where you would put that within the category.php file

    whereever you want the text to show up.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Adding Static Text to Single Category’ is closed to new replies.