[Resolved] i want to get posts based on page name
so on a record label website, there are pages of artists. my goal was to use the same template for all. below the bio section, i wanted to get posts for that artist. the posts are tagged “news” but i only want news from the artist. without making individual themes – i thought i would do this by getting the posts by page title – since the page title is also the artists name.
so – get post of the category that is the same as the page-title.
first attempt was to insert echo like this
<?php query_posts('category_name=posts&showposts=0') ?>
which pulls all “posts”
then figured i could add an echo in there in place –
<?php query_posts('category_name=<?php echo get_the_title($ID); ?> &showposts=0') ?>
but no go-
any ideas ? i think i’m going about this all wrong – but i can’t wrap my head around it. ? ? ? i want my client to be able to create new pages without my help… and this would solve that issue.
- The topic ‘[Resolved] i want to get posts based on page name’ is closed to new replies.