I want to setup a custom page on my site that pulls in posts from only one category. I’ve taken my main blog page template, duplicated the file and...
I am using Events Manager to control my Events, but Essential Grids to display previews of these events in various places throughout my site. An example of this is...
I am in the process of rewriting a lot of my code and restructuring a lot of my theme files to use template parts (i.e. using get_template_part()). I’ve come...
I am currently looking into passing a single query into multiple widgets on a template without running multiple queries. The obvious goal is speed and efficiency. I have a...
I have a link http://www.example.com/my-account/view-pet/?pet-page=2 I want to change it to either http://www.example.com/my-account/view-pet/pet-page/2 or http://www.example.com/my-account/view-pet/2 Here’s what I have tried to so far function wpse12065_init() { add_rewrite_rule('view-pet(/([^/]+))?(/([^/]+))?/?', 'index.php?pagename=my-account/view-pet&pet-page=$matches[2]', 'top');...
Imagine you have something like this: function f_posts_where( $where ){ // set a condition based on arguments ... } add_filter( 'posts_where', 'f_posts_where' ); What is the best way to...
I wrote a WP_query and the behaviour is weird. I tried almost everything but that’s not working. I found a solution but i try to understand. The following queries...
I used a very sinmple wp_query to retrive 10 posts on site with more then 100k posts. This query run on wp-multi site, same query against small site in...
I’m working on my first ever WP project. I have a theme that tiles all posts across the homepage – and I need to add a repeating advert every...
I’ve read alot, I’ve tried a bunch of different things, I still can’t get my query to order posts by acf’s datepicker field. This is what my code looks...