Creating a categories and tag page

Using the ICON stack and Essential Grid I want to display all post related to whatever category or tag a user has clicked. For instance, if a post displays 3 categories(C1, C2, C3) and the user clicks on one(C2), it should take them to a page where all C2 post would show. I’m not seeing a categories or tag template nor any option within the customizer. What files would I need to update and how would I have it display via the EG and not my custom template?

Hi,

Thanks for writing in!

Wordpress automatically creates those pages for you.

For example if you create News Category and News tag, the urls will be

http://yoursite.com/category/news/
http://yoursite.com/tag/news/

or depending on what you have set under `Settings > Permalinks.

Yes, I do know… however, I’m trying to figure where the categories and tag template files are located? Not seeing them in the icon or global folders.

Hi,

It’s the file wp-content/themes/x/framework/views/global/_index.php

You can create your own by creating a file category-news.php in the root directory of your child theme(wp-content/themes/x-child) . Copy the contens of _index.php to your new file(category-news.php) and modify it as you like.

For more information, kindly refer to the links below

Hope that helps.

Created a default category.php file within the root of my child theme wp-content/themes/pro-child, copied the contents of global/_index.php and while I’m getting content I want that content to display via the Essential Grid. Is this possible? How can I inject the Essential Grid into my default category template?

Hi there,

Please kindly consider that this is a custom development request and is outside of our support scope. We will do our best to show you how to do so but we will not be able to implement nor maintain the code for you.

You will need to use the default WordPress function called do_shortcode. You will need to go to the Essential Grid menu and select your grid and copy the shortcode:

In my case it will be:

echo do_shortcode( '[ess_grid alias="test"]' );

In your case, it will be the name of your grid item instead of the test.

Thank you.

I’m not just trying to inject EG on to the category.php page. If a user clicks a specific category… red plants, they get taken to example.com/category/red-plants where all post with the category red plants would show. I want the results to be the form of EG. Will adding the shortcode do so, or will it just display all the contents of the EG?

You will need to add a separate PHP file for each category. For example, if you have a news category you need to add a separate file: category-news.php then inside that file call the Essential Grid related to that category.

Thank you.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.