• dehog

    (@dehog)


    Hi,
    I m working on a new version of my blog, and needed a little help.
    I m trying to accomplish something like this :
    https://i118.photobucket.com/albums/o84/ckcp/other%20shared%20images/thetext.jpg

    but the problem is that if I place display=inline for all the <p> tags it gets all messed up, so the solution I guess is <p><span></span></p> but for that I need to be able to place a <span> with every <p>. Is there some plugin that could do this for me, or some hack in the wordpress which would enable doing so ?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Adding something like this in your theme’s functions.php file will work:

    <?php
    
    add_filter('the_content','ugly_text',11);
    
    function ugly_text($content) {
    
    	$content = str_replace('<p>','<p><span>', $content);
    	$content = str_replace('</p>','</span></p>', $content);
    
    	return $content;
    }
    ?>
    Dgold

    (@dgold)

    thanks for posting that code greenshady

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘customizing the <?php the_content(); ?>’ is closed to new replies.