• Resolved shakemyday

    (@shakemyday)


    I want each catagory to have its own text at the top.

    I have read:
    https://codex.www.ads-software.com/Category_Templates
    and
    https://codex.www.ads-software.com/The_Loop

    I have have the latest version of wp: 2:3:3 and the instructions on how to do this do not seem to match up with where my catagory.php file is located or examples of what the loop looks like (or just not in a way I understand)

    I copied category.php and made a file called category-3.php and tried sticking the recommended code everywhere I could think of. But since I do not recognize what “the Loop” starts- it is just trial and error. I tried uploading it to the same folder that category.php is in (wp-includes) nothing happend.and I tried uploading it into my theme folder (like in the instructions)- and I received error messages.

    I am using the Cutline 3-Column Split theme
    https://www.shakemyday.com/site

    Please assist me.

Viewing 5 replies - 1 through 5 (of 5 total)
  • whooami

    (@whooami)

    its a template file — its goes in your theme directory. NOT inside wp-includes/

    The loop starts here:

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

    and dont use the category.php inside wp-includes/ as your starting point. Thats not a template file. Those are inside your theme folders.

    If your current theme doesnt have one (a category.php) then you can use index.php or whatever it does have as an example

    Thread Starter shakemyday

    (@shakemyday)

    one portion of the mystery unfolding.=!!! thank you whooami.

    but! now that I have done that- it is clear that the catagory pages are presently being styled some how. and just taking the index page – adding in the line of text- and putting it up undoes all that styling. Where is that styling hiding so I can copy it?

    my modification category-3.php:
    https://shakemyday.com/site/?cat=3

    the styled original theme:
    https://shakemyday.com/site/?cat=24

    somehow the class “archive_head” is getting pulled in the original -which mine is missing etc etc.

    Thread Starter shakemyday

    (@shakemyday)

    The catagory pages are styled by the theme SOMEHOW- but I can not figure it out. and no replies here (yet) So I am forging forward attempting to code it myself. Following the the instructions: https://codex.www.ads-software.com/Category_Templates

    when you want the first page of the catagory to be different from the next pages- you use this code:

    <?php if ( $paged < 2 ) {
    <p>Text for first page of Category archive.</p>
    <?php } else {
    <p>Text for subsequent pages of Category.
    Can be left out.</p>
    <?php } ?>

    I receive a syntax error for the line:

    <p>Text for first page of Category archive.</p>

    I have tried removing spaces and everything else I can think of to get this little bit of code to behave but it is not.

    Does anyone know what code would work?

    moshu

    (@moshu)

    Line 1 and 3 are missing the closing ?>

    Edit. I have updated the Codex…

    Thread Starter shakemyday

    (@shakemyday)

    YAY!!! it works!
    Thanks moshu.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Catagory text’ is closed to new replies.