Site logo

Archived topic

the grid plugin integration

7 replies · Started by MEHOW INT LTD on February 9, 2019

Viewing posts 1–8 of 8

Hi can you help me with the grid plugin integration and replace your default plugin code. (well did i need first load a child theme to do this?)
and replace default grid settings to the grid plugin settings. Code to replace is listed
https://theme-one.com/docs/the-grid/#grid_as_template
but is a bit different from default Wordpress theme code. tnx.

Hi there,

Yes, you would need a child theme for this.

To replace the posts on your blog page, you would need to copy the index.php file and add it to your child theme.

Then, if I understand their documentation correctly, you would replace this line with their function: https://github.com/tomusborne/generatepress/blob/2.2.2/index.php#L38

For archives (like categories, tags, date archives etc..), you would copy the archive.php file and replace this line: https://github.com/tomusborne/generatepress/blob/2.2.2/archive.php#L42

Hope this helps :)

ok, but where is a child theme? Download area is empty for "child" tnnx.

Child themes are supposed to be empty.

As Tom mentioned, you would need to copy the index.php file and add it to your child theme then make the modifications he specified.

sorry to say but this solution is no working, site is crash i try activate php log:

[10-Feb-2019 13:17:14 UTC] PHP Fatal error: Maximum execution time of 30 seconds exceeded in /home/DOMAIN/webapps/DOMAIN/wp-includes/kses.php on line 1448
[10-Feb-2019 13:22:03 UTC] PHP Fatal error: Maximum execution time of 30 seconds exceeded in /home/DOMAIN/webapps/DOMAIN/wp-content/plugins/the-grid/includes/item-skins/grid/brasilia/brasilia.php on line 12
[10-Feb-2019 13:22:56 UTC] PHP Fatal error: Maximum execution time of 30 seconds exceeded in /home/DOMAIN/webapps/DOMAIN/wp-includes/kses.php on line 1336
[10-Feb-2019 13:23:39 UTC] PHP Fatal error: Maximum execution time of 30 seconds exceeded in /home/DOMAIN/webapps/DOMAIN/wp-includes/class-wp-user.php on line 498
[10-Feb-2019 13:24:24 UTC] PHP Fatal error: Maximum execution time of 30 seconds exceeded in /home/DOMAIN/webapps/DOMAIN/wp-includes/l10n.php on line 1167

Well to be clear for site with ~20 post. And plugin itself working fine with native load by shortcode on simple page. Must be a wrong place to paste this replace code.

maybe not on this line?
get_template_part( 'content', get_post_format() );
to replace

tnx

Ok. I fund some solution but i need replace this code who is responsible for display in loop posts for a new widget area. Then I can run a plugin via php widget and it working fine. Do you have some solution how to add new widget area to place where is a content in archive.php so i can run code in this way. tnx.

You can create a widget area like this:

add_action( 'widgets_init', function() {
    register_sidebar( array(
        'name'          => 'Your Widget Area Name',
        'id'            => 'your-widget-area-id',
        'before_widget' => '<div>',
        'after_widget'  => '</div>',
        'before_title'  => '<h2>',
        'after_title'   => '</h2>',
    ) );
} );

Then you can display it in the template like this:

dynamic_sidebar( 'your-widget-area-id' );

This archived topic is closed to new replies.