Custom category page

Posted in: Newspaper
Post count: 14

Hi.

I have a custom category template. In this template i use the core function have_posts(), but this returns false on some categories, and on others i returns some, but not all posts.

Why is that? If i use the themes standard template for categories all posts are displayed. It makes no sense.

Regards.

Post count: 35449

Hi,

I do no quit understand, please provide some more details, this custom template what suppose to do ?
If is the layout or filter post way not use tagDiv Cloud Library

Thank you.

Post count: 14

it is supose to do this: https://bygselvviden.dk/vaerktoejstest/bajonetsav/

But on some categories it returns no posts.

i use this loop: <?php if ( have_posts() ) : ?> to get them, but for some reason the if case returns false on some categories. ?

I use this code to handle it: https://pastebin.com/FaKCeUma

Regards.

Post count: 14

it worked like a charm on my old theme.

Post count: 35449

Hi,

Is possible that you miss some piece of code https://www.screencast.com/t/kILwQand

You can do that with a template for category from cloud library, if you want you can make some test on an affiliate link https://affiliate.tagdiv.com/#/load/Category
The old theme was newspaper, if yes, why you do not do this changes in child theme

Thank you for your understanding.

Post count: 14

It isnt all categories taht should have this layout, so i use a plugin called Custom Category Template to change the templates on category level. I do work in a child-theme.

You change with the the_post().

As i say the have_posts(), returns false as if there where no posts in the category.

Post count: 14

Some categories return false for posts, and others return a smaller amount.

And it worked with my old theme.

Post count: 14

if i place my custom category (the the child-theme) to override the standard category file i get the same results. Posts are missing!

Post count: 14

I finaly figured it out. It was the featured posts in the categories that jamedit.

Now i got this issue with featured images. If you hover “værktøjstest” in the menu, the images are not good, the are being show only half. I regenerate the thumbs.

What to do?

Post count: 35449

Hi,

Please read our documentation about future image -> https://forum.tagdiv.com/featured-image/

Thank you for your understanding.

Post count: 14

Im not sure how to change this? I want a center crop on images?

Post count: 35449

Hi,

In order to make this crop center center you need to edit a theme file , please go in:
\wp-content\themes\Newspaper\includes\td_config.php
Go on line 1532 to td_api_thumb::add(‘td_218x150’, and set there center center
https://www.screencast.com/t/LqQM6pQChVG1
https://www.screencast.com/t/LBxgi7XdaC77
From now on all thumbs with this size will be crop center center, but you’ll need to regenerate all future image set until now.
In order to do that you need to install regenerate Thumbnails
select the feature image and click on regenerate
-> https://www.screencast.com/t/wut3hSoLW
https://www.screencast.com/t/cjGzRstlxxi

Hope this will help you.

Thanks.

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