Including Page Content On Posts
-
hi there
I have a publishing website on which I place posts on behalf of others. Each post includes a meta value “Author Name”, I also create a page for each Author of the format “Author Name”, eg the slug is “author-name”.
Using
str_replace(” “, “-“,
strtolower(get_post_meta($post->ID, “Author Name”, 1)))I can therefore create a link to the page, however I would like to extract the content of the page and place a shortened version of it (using substr() or suchlike) on the sidebar oof the relevant post.
So basically I want to be able to get_page() based on the Page Title, and grab the content from that page. I can’t work out how to do this with pages, they don’t show up in the loop in the normal manner like posts do… thank you for any help you can provide.
- The topic ‘Including Page Content On Posts’ is closed to new replies.