• Hello,

    I’d like to change my category header image and display the category description in every of my category archives.

    I have been trying but I can’t locate the “category.php” file or anything close to that where I could add the following code to display the description : <?php echo category_description( $category_id ); ?>

    I’d be very grateful if you could help me to sort this out.

    Thank you very much for your support, I am looking forward to hear from you,

    Regards,

    Benjamin

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Theme Author apollo13themes

    (@apollo13themes)

    Hello:-)

    You can put your code in index.php, as we use only one file for all archive type, and decide what print based on conditional tags like is_category.

    You could also copy content of index.php and create your desired category.php, and work in it. Templating in WordPress will work its magic:-)

    With kind regards.
    Air.

    Thread Starter benjamink31

    (@benjamink31)

    Hello,

    I am afraid that anytime I try to add code on the index.php (on my child theme) file it makes the website crash.

    Any idea where it could come from ?

    I tried to add a plugin allowing to add an image for each category or taxonomy (plugin is called Category Images). It requires a line of code to work :

    <?php if (function_exists(‘z_taxonomy_image_url’)) echo z_taxonomy_image_url(); ?>

    But as soon as I add it to the index.php file I have issues.

    Thanks for your support

    Theme Author apollo13themes

    (@apollo13themes)

    Hello ??

    You will have to inspect your server PHP error log, to find out where is the issue.

    It depends also how your whole code looks, where exactly you are inserting it.

    With kind regards.
    Air.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Change header image for Category and display description’ is closed to new replies.