Let user select the number of posts shown per page jquery error

A simple fix would be to change the query name; i.e. from page to pageVal. <script> jQuery(document).ready(function( $ ) { $(‘.page-select’).change(function(){ var checkIndex = ( window.location.href || ” ).indexOf(‘?’); if( checkIndex > -1 ){ var Link = window.location.href.substr(0, checkIndex-1); $(location).attr(‘href’, Link+’?pageVal=”+$(“.page-select’).val()); } else { $(location).attr(‘href’, window.location.href+’?pageVal=”+$(“.page-select’).val()); } }); }); </script> But I’d use this..: <script> … Read more

Set SQL_BIG_SELECTS and MAX_JOIN_SIZE on a WP_Query

According to WP_Query hit max joins… How else can I build a search function that uses custom fields? you should use $wpdb->query(‘SET OPTION SQL_BIG_SELECTS = 1’); which makes sense as you set it for the current connection. You create a separate connection through new mysqli and WordPress has another on $wpdb.

OR condition not working

The problem is strictly with your query… or to be more precise, with your misunderstanding of your query 😉 You’ve put || in there and you assume it is OR operator, but… depending on configuration of server it can act as OR or… string concatenation 😉 So change it to OR and it should work … Read more