How to load "The Grid" (or widget) after posts

Hello Themeco community!

I know that my questions may be stupid but I’ve searched in the forum (Googled it as well) and I couldn’t get an answer. So excuse me in advance. I’m a wordpress beginner :frowning: .

My questions :

  1. I’ve made a grid using “The Grid” plugin/extension. I would like it to load right after a post ends (specifically before the tags section) and only to appear for a certain category of posts (specifically the “Around the world on a Vespa” category).

  2. I’d also like to add another grid (or widget) in the footer area of my posts. I guess I can do that in the “widgets” section BUT the thing is that I want it to appear only in my posts and only for a certain category of posts (specifically the “Around the world on a Vespa” category).

Any help on how to make the above, please?

Thank you in advance,
Stergios (https://www.worldvespa.net)

Hello @s_gogos,

Thanks for asking. :slight_smile:

Displaying grids after posts content will require custom development which fall outside the scope of the support we offer. However, I can definitely help you to achieve that layout by pointing in right direction.

As stated, this requires custom development which means making code changes in the theme files and for that highly suggest you to setup child theme. I am sharing few resources that you can use to download X Child Theme and refer tutorials for best practices that we recomend:

https://theme.co/apex/child-themes


  1. Once you have installed and finished setting up the child theme, you need to copy _content-the-content.php from /wp-content/themes/x/framework/views/global/ to /wp-content/themes/x-child/framework/views/global/. Please note that you may need to create additional folders. Please open the file and right after line number 20 i.e <?php do_action( 'x_before_the_content_end' ); ?> use following code to output grid you have created:

<?php echo do_shortcode('[the_grid name="New Grid"]'); ?>

Over here thing to note is that, [the_grid name="New Grid"] is the shortcode that you will get from the grid main page. https://screencast.com/t/oO5Hm7Za

  1. To display widget on a specific post, you can use Restrict Widgets plugin. https://wordpress.org/plugins/restrict-widgets/

I also suggest you to please refer our documentation that we have published for The Grid in knowledgebase section which will help you to make necessary changes:

Thanks.

1 Like

Thanks for the reply @Prasant!
I’ll try your suggestions asap.
:slight_smile:

Hi @s_gogos,

Let u s know how it goes.

Thanks.

Everything works!
Thank you very much for the support!

You’re welcome!
Thanks for letting us know that it has worked for you.

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