3
votes
1answer
174 views

How can I reduce the number of database query calls for this custom homepage?

I am working on the design of a blog with the below(just a sample) category hierarchy. PARENT | ...
3
votes
1answer
252 views

Is it true $wpdb->get_results is faster than WP_Query in most cases?

On my homepage, I have a section where I have to display the last five featured posts, where a featured post is simply a post with a custom field is_featured set to 1. I achieved what I want with two ...
1
vote
1answer
263 views

get_the_title($postID) OR get_the_title()?

I would like to know which could be more performant between these two approaches of getting data of a post To use a loop after a WP_Query($aConditions) and use functions like get_the_title() ... and ...
0
votes
1answer
39 views

How to avoid filling up an array each time I run a WP_query?

I am making a following user system and need some help for retrieving the users ids a user is following. At the moment I am using the following SQL query for retrieving the users ids a user is ...
0
votes
0answers
33 views

What is the best way and how do I display posts from categories and users a user is following?

I am making a user/term following system where users can follow users and terms (inlcuding categories). Once the user follows another user and/or term I am saving the ids for each in a custom table. ...
0
votes
0answers
45 views

Post OrderBy slow performance

I have been struggling for quite a while now with this, to put in simple term here is what i do. I do an OrderBy with wp_postmeta information This allow me to give an additional date to play with. ...
0
votes
2answers
140 views

Multiple queries on Home Page - page load/site speed issue

I acquainted a client who designed his own fashion magazine site. My company handed the project to me to make it with WordPress. When I was making the complete template for the site, I found his ...
0
votes
1answer
136 views

Performance concerns: index.php vs taxonomy-$taxonomy.php

On one of our latest projects I'm planning to use the index.php file to display different taxonomy layouts. Basically I'm planning to use is_tax( 'sometaxonomy' ) to display the data/loop for ...
1
vote
1answer
889 views

WP_Query Performance Issues with meta_query

I'm working on a custom template for a new theme that uses a WP_Query instance to select posts from 2 post types with 2 custom fields that are NOT empty. Depending on the section of the site, a ...
1
vote
1answer
206 views

reducing the amount of wp_query calls

I'm working on a site where we're introducing drop down panels from the menu which will display thumbnails from various tags on the site. Each panel has a left column displaying a featured post, and ...
0
votes
1answer
83 views

Which is from this queries is more faster

I need to do some query. Now i choosing from this variables. Which is from this queries is more faster. Which differences between them ? function filter_where($where = '') { $where .= " AND ...
5
votes
1answer
212 views

Should I use Transients with W3 Total Cache APC Caching? [closed]

Should I use Transients in my queries like this? <?php if ( ! $my_paged = absint( get_query_var( 'paged' ) ) ) $my_paged = 1; if ( ! $my_query = get_transient( "567recent_$my_paged" ) ) { ...
0
votes
2answers
305 views

Disable (or limit) queries when certain content (or data) is not needed (or showed)

Currently I am making a custom design for a site. The problem I'm seeing in Wordpress is about almost all data pulled out from the database. While in certain pages - like front-page.php - it only ...
1
vote
1answer
522 views

Filtering by Post Meta Custom Fields - Performance

I could use some advise on how to structure my data for performance. I have a custom post type with a lot of custom meta data stored in the wp_postmeta table as a serialized array under one meta key ...
2
votes
2answers
2k views

Improving WP_Query performance for multiple taxonomies

I have a site with several custom taxonomies, and have found that one of the slowest parts of the site is attempting to query with an OR across several of these at once. I'm using a WP_Query like so: ...
5
votes
2answers
945 views

Differences Between WP_Query() and get_posts() for Querying Posts?

What are the differences between using WP_Query() and get_posts()? Which is better to use in what case and why?