Forum Replies Created
-
AuthorPosts
-
sim_basMember
I tried to insert the "first" class on the first column but it doesn't work (it justs eliminate the left-margin of the pink div).
If this could help someone, I resolved the issue inserting the div with custom fields in entry-content (instead of before entry-content) adding the classes for the first column of the grid (in my case "one-half" and "first"). Then I styled instead of the whole entry content just only ".entry-content p" giving it the same values of one-half (second column of the grid) should have like this:
.myclass .entry-content p { float: right; width: 48.717948717948715%; //same value of one half margin-left: 2%; }
Then I custom style ".myclass .entry-content p" for devices with media queries
It is a little bit tricky but it works…sim_basMemberHello Brad, thank you for your answer, I'm looking for a solution in the way you suggested, the problem is that columns does not floatings and remains one below the another.
Here is the code of the solution that I'm trying now:// full-width layout add_filter( 'genesis_site_layout', '__genesis_return_full_width_content' ); */ /* ACF */ add_action( 'genesis_before_entry_content', '\contenuto_sx', 1 ); function contenuto_sx() { echo '<div class="one-third" style="background:pink;">'; echo get_field('titolo'); echo get_field('data'); echo get_field('info'); echo '</div>'; } /* entry-content */ add_filter ('genesis_attr_entry-content', '\contenuto_dx'); function contenuto_dx ( array $attributes ) { $attributes['class'] .= ' one-half'; return $attributes; } remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_open', 5 ); remove_action( 'genesis_entry_header', 'genesis_do_post_title' ); remove_action( 'genesis_entry_header', 'genesis_post_info', 12 ); remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_close', 12 ); remove_action( 'genesis_entry_footer', 'genesis_post_meta' );
And here is a screenshot of the result:
sim_basMemberHello Brad, thank you for your answer. I'm looking for a soluction in the way you suggested, the problem now is that the columns not floatings but stay one below another…
Here is the code I'm using now:
/* ACF */ add_action( 'genesis_before_entry_content', '\contenuto_sx', 1 ); function contenuto_sx() { echo '<div class="one-third" style="background:pink;">'; echo get_field('titolo'); echo get_field('data'); echo get_field('info'); echo '</div>'; } /* entry-content */ add_filter ('genesis_attr_entry-content', '\contenuto_dx'); function contenuto_dx ( array $attributes ) { $attributes['class'] .= ' one-half'; return $attributes; } remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_open', 5 ); remove_action( 'genesis_entry_header', 'genesis_do_post_title' ); remove_action( 'genesis_entry_header', 'genesis_post_info', 12 ); remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_close', 12 ); remove_action( 'genesis_entry_footer', 'genesis_post_meta' );
And here is the result I get…
-
AuthorPosts