Tagged: inline styles
-
AuthorPosts
-
December 14, 2023 at 10:14 pm #1428158
On this page, a gap appears in the footer where some inline styles and a p tag have been somehow inserted. This footer is created as a page. I’ve seen this issue before but it’s elusive. Sometimes goes away after saving pages or styles or something…. not sure. This time it seems very persistent on this page.
Here is the code that is being inserted. Where does this come from? How do I stop it? Why is it only on this page?
<p>
<style type=”text/css” data-created_by=”avia_inline_auto” id=”style-css-av-jfgi5bwp-77838ec405745bb03eb0885aac664314″>
.avia-section.av-jfgi5bwp-77838ec405745bb03eb0885aac664314{
background-color:#000000;
background-image:unset;
margin-top:0px;
margin-bottom:0px;
}
</style>
</p>December 15, 2023 at 9:49 am #1428191Hey bluesbrush,
Please try using this filter in functions.php:
/** * Filter to skip css file generation. * You can add logic to skip for certain pages/posts only. * * @since 4.8.6.1 * @param boolean $create * @return boolean true | false or anything else to skip generation of css file */ function custom_avf_post_css_create_file( $create ) { return false; } add_filter( 'avf_post_css_create_file', 'custom_avf_post_css_create_file', 10, 1 );
Best regards,
RikardDecember 15, 2023 at 10:48 pm #1428248Interesting. thank you, Rikard, for providing that. I don’t have enough php experience to understand exactly what that filter is doing or if there is any potential downside to using it so it would be best if I applied it page specifically. Any idea why this is an issue on that specific page? I’m trying to understand how it got there.
December 16, 2023 at 2:03 pm #1428266Hi,
Thank you for the link to your page, I have not seen this error before, but typically the inline css does not cause this. WordPress wraps spaces with the “p” tags automatically, but it should not be wraping the inline css.
You say that it is elusive and sometimes goes away after saving pages or styles or something and it’s only on this page, so to solve only on this page with css try this CSS in your Enfold Theme Options ▸ General Styling ▸ Quick CSS field:#top.page-id-13874 #footer-page > p { display: none; }
Please ensure to copy the code from the forum and not an email notification so the symbols are not converted.
After applying the css, please clear your browser cache and check.Best regards,
MikeDecember 27, 2023 at 9:25 pm #1428926Thanks, Mike. That did do the trick. It seems a bit broad targeting all the p tags in the footer but it doesn’t seem to have negatively effected the other elements.
December 27, 2023 at 9:25 pm #1428927I’m still very curious where this mysterious paragraph comes from and why it was just occuring on that very ordinary page?
December 28, 2023 at 5:32 pm #1428961Hi,
Glad that this helped, I have not seen this error before and you said that it only shows sometimes on this one page, so I don’t know what may have caused this.
The css solution above will only effect the footer on this one page, so it should not cause any issues in the future.Best regards,
Mike -
AuthorPosts
- You must be logged in to reply to this topic.