- This topic has 5 replies, 2 voices, and was last updated 2 years, 5 months ago by
Fernando.
-
AuthorPosts
-
April 11, 2023 at 8:18 pm #2606472
Jonny
Is it possible to create a custom landing page for several different categories on my site?
For example, I have continent categories such as Africa, Asia, Australia, Europe, North America, Central America, South America, Middle East.
I want to create a custom landing page for each of these continent categories to include a featured image, text, featured posts (using WP show posts), and other blocks.
Also on these continent category landing pages, I want to include each country within the continent and for each of those countries to have its own custom category landing page.
In addition, is it possible to create a template for these category landing pages so I don’t have to create a landing page for each individual category and rather just be able to replace the featured image, text, featured posts, etc?
I have linked my website below and another website as an example of what I am trying to achieve.
Please note that I don’t want to create a “Page” for each of these destinations, they have to be a category so it shows in the URL and breadcrumbs.
April 11, 2023 at 8:32 pm #2606481Fernando Customer Support
Hi Jonny,
For instance, do you want to alter the entire look of category pages like oceania?
If so, you can use a Block Element – Loop Template with a Query Loop Block for the posts, and other Blocks for the other stuff would do.
Reference: https://docs.generatepress.com/article/block-element-loop-template/
You can try it first on one category page like oceania to test.
April 11, 2023 at 10:57 pm #2606568Jonny
Yes I would like to change the design of each category page like Oceania. I will likely have a few dozen category pages for each destination, each with the same layout/design but just different content on each page such as images, text, etc.
What does loop template with query loop block mean – I’m a little confused with that reference article you sent.
Does this mean I can create a template to be used for all the ccategory landing pages I wish to create? Once template is created, how do I create/edit each category landing page without affecting the template?
April 11, 2023 at 11:44 pm #2606604Fernando Customer Support
The term “category” landing pages seem to indicate something different. It sounds like you want to have a static page showing all categories with this term. If this is what you’re referring to, a different approach is needed.
If you need a template for category archive pages, a loop template would be good. This would allow you to create a template for all. You can then create custom fields for your categories so you can just retrieve data dynamically. In this way, you just need to edit one “template” which would be the Loop Template.
How different would each category archive page be?
April 12, 2023 at 12:14 am #2606641Jonny
Hi Fernando,
A static page showing all categories is not what I am trying to achieve.
I have sent you some links to a website that has a custom page for each category (each category being a country, and destination within that country).
On the example site I provided below, the design/layout (or template) is pretty much the same for each category, however, the content on each category page is different such as the name of the destination, featured image, text, etc.
On my site, I have a category for each country and a category for each destination within each country.
I don’t want to have a generic Category Archives page (which it is currently for all my categories).
I want to have a custom page for each individual category with information about that category which is the country/destination.
Hope that makes sense, I’m not sure how to explain it differently.
Many thanks for your help!
April 12, 2023 at 12:40 am #2606679Fernando Customer Support
Yes. You can try creating the through a Loop Template.
You can create custom fields for the archive page through ACF: https://www.advancedcustomfields.com/resources/getting-started-with-acf/
Then, create a Loop Template.
Then, for instance, for the title of the Archive page, add a Headline Block with Dynamic options enabled. Retrieve the Title: https://docs.generatepress.com/article/dynamic-data/#title
Then for the custom ACF field, this section of the article would be relevant: https://docs.generatepress.com/article/dynamic-data/#term-meta-1
Basically, retrieve each term meta.
You’ll likely need a custom code though for the “Countries” section.
The Page Hero, “Hop about Oceania” and a list of posts section can be done through Blocks dynamically. The bottom part seem to be constant for all pages so you can create this statically inside the Loop Template as well.
-
AuthorPosts
- You must be logged in to reply to this topic.