WP_Query equivalent of SQL UNION ALL

You can run 2 wp_query, get the ids and pass those as the post__in parameter to a 3rd wp_query. Not efficient but will do the job. Or you can use a subquery and do it all with just one wp_query. Something like the following: add_filter( ‘posts_where’, ‘myprefix_posts_where’, 10, 2 ); new WP_Query([ ‘post_status’ => ‘publish’, … Read more

Recover WordPress site from critical error?

Enable debug in wp-config.php and read the debug_log: https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/ The problem is probably an incompatible plugin or a theme incompatible with the newest version of WordPress.

Problem with register_setting()

Your code looks fine at first glance, but the Plugin Checker is complaining about the dynamic argument in register_setting(). This usually happens when register_setting() receives an argument that is not a direct function reference or a string literal. function inseco_sanitize_textarea($input) { return wp_kses_post($input); } register_setting( ‘inseco_settings_group’, ‘inseco_code_after_page’, array( ‘type’ => ‘string’, ‘sanitize_callback’ => ‘inseco_sanitize_textarea’, // … Read more

Change color of active link to navigation menu

Consider changing the CSS to: .wp-block-navigation-item.current-menu-item .wp-block-navigation-item__label { color #365ABA !important; } Please note, this only works on the Πρότζεκτς and Γνωρίστε μας menu items. As these are the only pages that get the current-menu-item class when on their respective pages. For the other menu items, you may need to look at re-adding the menu … Read more

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