Question: How to add content at the last page of a certain category

Posted in: Newspaper
Post count: 209

Hello!
I’d like to add content at the last page of a category-page, based on a cloud-template. With my last non Newspaper theme I did this with a child theme and added the following code at the end of the post-loop in my child themes category.php:

if (is_category("slag-a") || is_category("slag-b") || is_category("slag-c")) {
global $wp_query, $paged;
$max_page = $wp_query->max_num_pages;
if ($paged == $max_page && is_category("slag-a")) {
echo "Text a here";
}
if ($paged == $max_page && is_category("slag-b")) {
echo "Text b here";
}
if ($paged == $max_page && is_category("slag-c")) {
echo "Text c here";
}
}

How can. I realize this with newspaper? Which file do I have to change?

Post count: 35449

Hello,

This should work in our theme too, but not if you are using cloud templates, this will apply only on default templates, the category.php file is in wp-content/plugins/td-composer/legacy/Newspaper/category.php
Child theme documentation -> https://forum.tagdiv.com/the-child-theme-support-tutorial/

Thank you!

Viewing 2 posts - 1 through 2 (of 2 total)
The forum ‘Newspaper’ is closed to new topics and replies.