Archived topic
Masonry option is not working
14 replies · Started by Deepa on September 5, 2019
I have a basic blog roll on the home page and the moment I select show posts in masonry, the home page blanks out.
I attempted inactivating all the plugins and activating one at a time. No luck.
Hi there,
Is that only happening in the Customizer? When it happens, are there any errors in the "Console" tab when you right-click + Inspect the page?
I have only tried the customizer. Is there another way to try it ? I don't see any errors in the console when I inspect on Chrome. I don't have other browsers.
Can you send me the dashboard admin access to take a look?
You can send the dashboard access using Account Issue here:
https://generatepress.com/contact/
Please include the following information:
– The URL of this topic.
– Login URL.
– Username and password.
Please disable all plugins except GP Premium.
Thanks!
You have these functions added in the theme's function.php file:
function create_copyright() {
$all_posts = get_posts( 'post_status=publish&order=ASC' );
$first_post = $all_posts[0];
$first_date = $first_post->post_date_gmt;
_e( 'Copyright © ' );
if ( substr( $first_date, 0, 4 ) == date( 'Y' ) ) {
echo date( 'Y' );
} else {
echo substr( $first_date, 0, 4 ) . "-" . date( 'Y' );
}
echo ' <strong>' . get_bloginfo( 'name' ) . '</strong> ';
_e( 'All rights reserved.' );
}
add_filter( 'generate_blog_masonry', function( $default ) {
if ( is_tag() && 'page' === get_post_type() ) {
return 'true';
}
return $default;
} );
add_filter( 'generate_blog_columns', function( $default ) {
if ( is_tag() && 'page' === get_post_type() ) {
return true;
}
return $default;
} );
Is the issue fixed if you remove them?
I just removed the function and saved it. Went to customizer to check masonry option and still the same issue.
I still see this function inside the function.php file:
https://www.screencast.com/t/wiE0U1pRgA
That file should look exactly the same as this:
https://github.com/tomusborne/generatepress/blob/master/functions.php
HiI don't see the function anymore. Can you refresh your screen may be ?
It's definitely still there:
https://www.screencast.com/t/x0SwO1oEXpm
OK. I removed that function too and matched it with your git file. Exact same code with 97 lines. Still no luck.
Have you modified any other theme's or plugin's files in any other ways?
No. The only thing I attempted was to add a footer that we reverted. All plugins other than GP are inactive anyway.
Hi there,
You've removed the wp_footer() function from the footer.php file: https://github.com/tomusborne/generatepress/blob/2.3.2/footer.php#L61
Without that function, no theme or plugin can add javascript to your site.
Thanks a lot Tom and Leo. It works.
Glad we could help :)