Query ‘orderby’ when there are multiple values for the same meta_key

Sorting by multiple meta keys (ref) may be helpful (untested): add_action( ‘pre_get_posts’, function ( \WP_Query $query ) { $orderby = $query->get( ‘orderby’ ); if ( ‘start_date’ === $orderby || ‘end_date’ === $orderby ) { $meta_query = array( ‘relation’ => ‘OR’, ‘meta_query_1’ => array( ‘key’ => $orderby, // start_date or end_date ), ‘meta_query_2’ => array( ‘key’ … Read more

View php file path under footer

Different site would mean different themes and plugins, so likely that’s it. A plugin like Query Monitor will show you the template file, as well as a lot of other helpful pieces of information.

plugin user-role-editor: cannot access settings page, but I’m admin?

I opened the plugin and found this capabilities tested ‘ure_edit_roles’ => 1, ‘ure_create_roles’ => 1, ‘ure_delete_roles’ => 1, ‘ure_create_capabilities’ => 1, ‘ure_delete_capabilities’ => 1, ‘ure_manage_options’ => 1, ‘ure_reset_roles’ => 1 I added manually this capabilities to my user, editing the related wp_usermeta for my id and key “wp_user_capabilities”. Now I can enter into plugin’s setting … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)