[Support request] the grid plugin integration

Home Forums Support [Support request] the grid plugin integration

Home Forums Support the grid plugin integration

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #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.

    #806264
    Tom
    Lead Developer
    Lead Developer

    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 🙂

    #806279
    MEHOW INT LTD

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

    #806299
    Leo
    Staff
    Customer Support

    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.

    #806517
    MEHOW 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 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

    #806685
    Tom
    Lead Developer
    Lead Developer

    Their 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

    #806838
    MEHOW 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.

    #806984
    Tom
    Lead Developer
    Lead Developer

    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' );

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.