Same text on multiple pages and categories

Posted in: Newspaper
Post count: 20

Hello, I need to change an introductory text on several pages and categories. When I do it using text blocks, the same text is duplicated across all categories, pages, and posts. If I use the category text instead, the block appears empty on pages because they are not categories.

I would like to insert an independent text block on each page, section, or wherever I need it in each specific case.

Could you please help me with this?
Thank you very much in advance.

  • This topic was modified 6 months by Santy.
Post count: 35449

Hi,
Just let me know if I understand correctly. You want to have some dynamic text based on category, right? If is so, then on pages just use a text element since the pages ar individual and will not be a problem, but onthe category template you need to use a different element, maybe the category description element, set it on the template using tagDiv Composer and after that just set a description for each category in part using the WordPress option.
https://i.imgur.com/p1KHjBI.pnghttps://i.imgur.com/y4b19I0.png
Thank you!

Post count: 20

I have a layout where I use Category Description to display custom text for categories, and it works correctly on category pages.

However, I have an issue with the top menu:
some menu items are normal pages, not categories. When I open those pages, an empty text block appears, as if they were categories, showing the default placeholder text (like “lorem ipsum”).

The problem is that:

If I delete the category description text on one page, it is deleted on all categories and pages.

If I add text using Text with Title or Inline Text in the template, that text appears on all categories, pages, and posts.

The Category Description seems to be shared globally across archives/pages when the same template is used.

I cannot set different texts for pages and categories without affecting posts or other pages.

What I want is:

Categories → show their own category description text

Pages in the top menu (not categories) → show different custom text or no category text

It seems the problem has been fixed by lowering the category text a bit; if it’s lowered just above the entries, it behaves correctly. Just in case that helps.

Thanks

Post count: 35449

Hi,

Strange, normally, the category description is an element that should not be displayed on pages. It’s possible that it was copied from a cloud category template. Category elements should be used only on category templates.

For pages, you should use the Text with Title element instead. Pages are individually edited with tagDiv Composer, so you can set different text for each one. On the other hand, in a category template, the text set in the template is used across all categories that use it, which is why category-specific elements are required to render the content correctly.

If I understand correctly, you’re saying that when you place the element lower on the page it works, but when you place it at the top of the page or template, the issue appears. If that’s the case, it may be caused by another element on the page that is interfering in one way or another.

Thank you!

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