Need a bit of help
-
So I’ve got this chunk of code in my functions.php file:
function about_page_excerpt() { global $wpdb, $tableposts; $aboutme = $wpdb->get_var("SELECT post_content FROM $wpdb->posts WHERE post_name = 'about'"); echo $aboutme; "<a href=\""; bloginfo(url); echo "Read more...</a>"; }
Basically what I’m trying to do is pull the contents of the About page and display it whenever the `<?php about_page_excerpt(); ?> is called.
Everything works fine, except I can’t figure out hot to keep the formatting. For example, if I have two paragraphs in the About page, what is shown is everything minus the
<p>
. How do I retain those? Thanks!
- The topic ‘Need a bit of help’ is closed to new replies.