WordPress.org

Ready to get started?Download WordPress

Forums

Magic Fields
query post based on title not working with 3 word title (1 post)

  1. sheriffderek
    Member
    Posted 1 year ago #

    <?php query_posts( array(
    	'category_name' => 'releases',
    	'artist' => wp_title("",false),
    	'showposts' => 0,
    	) )?>

    So here is my query. I want to get a list of posts in the category "releases" that are tagged with the taxonomy "artist" that matches the page title.

    So on the page for the artist "bob marley" the page title is "bob marley" so it grabs the posts that are tagged "bob marley."

    This was working great. UNTIL - I had a band with 3 words. So "Coyote Clean Up" will not retrieve the posts... but if I change it to "Coyote clean," it will.

    Does anyone know why this might be?

    I'm using the first magic fields - so I think that's how I got the taxonomy... But I don't think that is the issue. It seems to be the wp_title. is it limited to 2 words or something ?

    http://wordpress.org/extend/plugins/magic-fields/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags