WP_Query filter by custom meta

You can do a meta query using OR relation. After that you use get_users() function to get all the users you selected in the query. Then output their nicename in a list with using foreach. $your_url=”https://www.yoururl.com”; $your_description = ‘your description’; $args = array( ‘meta_query’ => array( ‘relation’ => ‘OR’, array( ‘key’ => ‘user_url’, ‘value’ => … Read more

Removing menus from users other than the administrator

If you want to exclude menu items by their labels: function hide_menu_items( $items ) { $items_to_exclude = [‘Menu Item 1’, ‘Menu Item 2’]; if ( !current_user_can( ‘manage_options’ ) ) foreach ($items as $key => $item) if ( in_array( $item->title, $items_to_exclude ) ) unset( $items[$key] ); return $items; } add_filter( ‘wp_get_nav_menu_items’, ‘hide_menu_items’, 20 );

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