Archived topic
page hero and load more article problems
51 replies · Started by francesco on October 12, 2022
Try adding this snippet:
add_filter( 'post_class', function( $classes ) {
if ( ! is_admin() && in_array( 'gb-query-loop-item', $classes ) ) {
$index = array_search('generate-columns',$classes);
if($index !== FALSE){
unset($classes[$index]);
}
}
return $classes;
} );
Adding PHP: https://docs.generatepress.com/article/adding-php/#code-snippets
thanks fernando, now it works perfectly. can I ask you, however, the reason and/or the cause of having to use this php code?
By default, loops in archive pages and the blog have this class: generate-columns. There are default CSS for this class one of which, adds the spacing you wished to remove.
With that CSS, we removed the class from your Query Loop Block.
ok, I have two more questions: david provided me with a CSS to underline the title on the left side of the page hero but I noticed that he only underlines the last part of the text when I would like him to underline all the text. how can i correct?
Aah you have a container link.
Change the CSS to:
.border-hover:not(:hover) h2 {
border-color: transparent !important;
}
And move the border-hover class to the GB Container Block that has the container link.
note that I also use this CSS.
@media(min-width: 769px) and (pointer: fine) { .paging-navigation p a:hover, h2.wp-show-posts-entry-title a:hover, div#rpwwt-recent-posts-widget-with-thumbnails-2 ul li a:hover, .generate-columns-container article.post:hover h2 { text-decoration: underline; } }
Could you start a new topic?
This is now 4 pages long and it is getting difficult for us to handle so many requests in the one feed.
ok david, thnx
You're welcome