Wordpress List Posts by Category that Matches Title


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <?php
  2. $catmatch = get_the_title();
  3. //The Query
  4. query_posts('category_name=' . $catmatch ); ?>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.