WordPress.org

Ready to get started?Download WordPress

Forums

Inserting static text in categories (1 post)

  1. seabard
    Member
    Posted 1 year ago #

    I'm trying to place static text at the top of a category and have searched the forum, which brought up various solutions. The one that seemed most appropriate to my situation was from three years ago, from MichaelH:

    Using the WordPress Default Theme, copy wp-content/themes/default/archive.php to wp-content/themes/default/category.php, then edit the file and change:

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

    to

    <?php echo category_description(); ?>
    <?php while (have_posts()) : the_post(); ?>

    But it doesn't work for me, so I must have missed something. I'm using the Genesis framework with a child theme and can't edit those files, so I did as suggested and edited the category.php file from the default theme Twentytwelve, assuming that this controls category functions no matter what the theme.

    I found it confusing to be adding the archive.php file to the category.php file, so I tried inserting the "echo" code in the clean category.php file as well. But nothing works either way.

    Where am I going wrong? Thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic