Fulltext search in posts sorted by relevancy

I’m building a custom search page and what I need is to sort results by relevancy (eg. occurences of a keyword) Using MySQL docs I’ve built this query: SELECT ID FROM $wpdb->posts WHERE MATCH (post_title, post_content) AGAINST (‘$keyword_list’) AND post_status=”publish” AND post_type=”issue” Problem A) If I test it using a keyword(s) that appears multiple times … Read more

How to sort a table of custom posts by column containing custom field

I have a custom post type called laptop with custom fields such as CPU, OS, RAM etc. creatied using the Advanced Custom Fields plugin. I’m displaying a table of laptops, where the table header is a row of custom fields, and each following row is a laptop name and it’s custom field values in each … Read more

How can I set a default listing order on the admin page for a custom taxonomy? (without plugins)

I’m researching this problem for days without any success… What I want is very simple: to see my custom taxonomy terms sorted by ID on the admin page. I can’t believe that something this simple can’t be accomplished without plugins. (I already have a sortable custom column, but it would be important to set the … Read more

Archive sorting functions by custom fields (front-end)

I want to give the users the ability to sort the posts in the archive by some custom fields that I pre-define. The end result would be en a tabbed container, and the user will click on the relevant filter-link that he/her want to see. As an example: http://www.metacritic.com/browse/games/genre/date/action/all I want to: – Filter by … Read more

What is the most efficient way to search users by their display name?

Initially I thought I’d use get_users() but it turned out it doesn’t support the display_name field. Then I’ve read about using WP_User_Query, but when I do it always exhausts the allowed memory size of 134217728 bytes. When I remove the memory limit this part of the page doesn’t even try to load. Now I’m thinking … Read more

Sort X categories by last update and show image

I want to display X categories, and sort them by last update. I also want to grab the image of the latest post with the category. <img src=”https://wordpress.stackexchange.com/questions/25860/<?php echo get_image(“article_image’,1,1,0,NULL,$res75); ?>” /> So, the category list will be displayed by images, with the corresponding category-name underneath. Sorted by last update. How would I go about … Read more