- This topic has 7 replies, 3 voices, and was last updated 4 years, 3 months ago by
Tom.
-
AuthorPosts
-
February 9, 2019 at 12:37 pm #806151
MEHOW INT LTD
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.February 9, 2019 at 4:34 pm #806264Tom
Lead DeveloperLead DeveloperHi 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#L42Hope this helps 🙂
February 9, 2019 at 5:05 pm #806279MEHOW INT LTD
ok, but where is a child theme? Download area is empty for “child” tnnx.
February 9, 2019 at 6:08 pm #806299Leo
StaffCustomer SupportChild 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.February 10, 2019 at 5:30 am #806517MEHOW INT LTD
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 1167Well 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 replacetnx
February 10, 2019 at 8:10 am #806685Tom
Lead DeveloperLead DeveloperTheir instructions aren’t really clear.
Maybe you need to replace this whole area: https://github.com/tomusborne/generatepress/blob/2.2.2/index.php#L30-L48
February 10, 2019 at 12:00 pm #806838MEHOW INT LTD
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.
February 10, 2019 at 7:30 pm #806984Tom
Lead DeveloperLead DeveloperYou 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' );
-
AuthorPosts
- You must be logged in to reply to this topic.