Need help? Check out our Support site, then


Can't use tags or categories as search criteria

  1. I'm setting up a private blog for family only, and I discover after a great deal labour already applied that the Tags are not read by the search widget. For example, If the entry something like "Last Saturday at Lake Greenish", and the content is "Someone ate far too many sausages, didn't they?", with tags of "Uncle Fred, Mort, Ginger", after publishing I can enter "sausage" into the seach widget and get the entry, but "Mort" produces a NO ARTICLES FOUND result, which is rather disheartening, as the whole point of the enterprise was to be able to search by tab and category. The category problem is less pressing because one can just have the drop-down list of them in the sidebar, but for tags there's just the Tag Cloud, and some tags aren't popular enough to appear in it.

    The blog I need help with is delintdiscs.wordpress.com.

  2. True. That's why I never use tags, but have over 400 categories. The WP.com search doesn't search tags and categories, but Google does. Unfortunately you can't use Google on a private blog.

  3. hi ravensmarch,

    i too have the same problem but i put custom query to search.php that help me find the desired result. here is the query that i used

    <br /> global $wpdb;</p> <p>$querystr = "<br /> SELECT wposts.* FROM $wpdb->posts wposts<br /> INNER JOIN $wpdb->term_relationships ttr ON wposts.ID = ttr.object_id<br /> INNER JOIN $wpdb->term_taxonomy trm ON ttr.term_taxonomy_id = trm.term_taxonomy_id<br /> INNER JOIN $wpdb->terms tm ON tm.term_id = trm.term_id<br /> WHERE (tm.name LIKE '%".$_REQUEST['s']."%' OR wposts.post_title LIKE '%".$_REQUEST['s']."%' OR wposts.post_content LIKE '%".$_REQUEST['s']."%') AND wposts.post_status = 'publish' AND wposts.post_type ='post' GROUP BY wposts.ID ORDER BY wposts.post_date";</p> <p>$pageposts = $wpdb->get_results($querystr, OBJECT);<br />

Topic Closed

This topic has been closed to new replies.

About this Topic