This is a great trick I found today while working on a problem for a client.
What was happening is that wordpress was wrapping her image in paragraph tags and causing it not to float right with text wrapping around it.
The solution was to add this to the functions.php file. (note, make sure you back up your funtions.php file first!)
function my_formatter($content) { $new_content = ''; $pattern_full = '{(\[raw\].*?\[/raw\])}is'; $pattern_contents = '{\[raw\](.*?)\[/raw\]}is'; $pieces = preg_split($pattern_full, $content, -1, PREG_SPLIT_DELIM_CAPTURE); foreach ($pieces as $piece) { if (preg_match($pattern_contents, $piece, $matches)) { $new_content .= $matches[1]; } else { $new_content .= wptexturize(wpautop($piece)); } } return $new_content; } remove_filter('the_content', 'wpautop'); remove_filter('the_content', 'wptexturize'); add_filter('the_content', 'my_formatter', 99);
Now you simply add [raw] and [/raw] tags around the element you are having a problem with.
Adding An Animated Icon To Genesis Responsive Menu
In this tutorial, we are going to be adding an animated icon and a responsive menu to the genesis starter theme from combining two different sources. For the responsive menu, we are going to be using the Genesis Responsive Menu 2.0 created by Ozzy Rodriguez. The full tutorial is located here. You can download the…
What Does Your Website Say About Your Business
OK, let’s get this out of the way first – I might be a little biased since I build websites in St. Augustine and Jacksonville for a living. Now that that is out of the way let’s talk about websites. For me, a website is a reflection of your business, just like your storefront or…
Advantages of working with a St. Augustine Web Designer
Yes, I realize you can work with anyone all over the world when it comes to finding someone to build your website. Some people really like the idea of working with someone from India, mainly because they get their website for a fraction of what it costs to use someone in the USA. But when…