Can’t update multiple rows with $wpdb query

$wpdb->query() returns number of rows affected by the query. It’s returning NULL indicates that there is an error in your query. The problem with your query is that you are updating $wpdb->posts table, but the condition depends on $wpdb->postmeta table. You have to join these tables for the query to work. Another problem is that … Read more

How to overwrite orderby with add_query_var

Use pre_get_posts instead.. function my_archive_query_override( $query ) { if ( $query->is_archive() && $query->is_main_query() ) { $query->set( ‘orderby’, ‘rand’ ); } } add_action( ‘pre_get_posts’, ‘my_archive_query_override’ ); For that user selectable part, you can use AJAX to accomplish that.

Flexslider won’t work on WordPress

It seems like you are following the tutorial from tutsplus “Slider to Your WordPress Theme” Coding looks correct but as @cybmeta already mentioned in the comment you need to set Featured Image for each slide to display in the slider properly. Details for Featured Image here also

Create page with custom php script and fetched data

1) It is easy to create tables in WP. I suggest making a plugin to handle this for you. See the codex for more info: https://codex.wordpress.org/Creating_Tables_with_Plugins 2) Again, I suggest using WP to handle this for security purposes. As you stated, you would have connection details that could potentially be exploited. 3) I think there … Read more

Accessing $post after PHP is executed

I believe the AngularJS plugin has solved this problem by filtering the content with the_content1 filter. They are using post meta to determine when the content should be loaded client side, but you can write your own function to determine when this is appropriate. This way the content is filtered instead of creating a new … Read more