Quantcast
Channel: WordPress.org Forums » All Posts
Viewing all articles
Browse latest Browse all 134312

rbgiddings on "Display post category on page based on page name"

$
0
0

Basically, if I have a page titled "Design", I want some page content followed by the most recent post in the category "Design". For the a page titled "Web", I want the most recent post from the category "Web" and so on.

I tried this solution:
<?php query_posts('category_name='.get_the_title().'&post_status=publish,future');?>

from this forum: http://wordpress.org/support/topic/display-the-posts-of-one-category-in-a-page-solved?replies=37

But it doesn't seem to work for me. Does anyone have any simple way to call in the Page Title into the Post Loop? New to PHP and Wordpress.org, and excited about what it can do.


Viewing all articles
Browse latest Browse all 134312

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>