How to customize user search

I was able to find a solution: if(!empty($search)){ $query = $wpdb->prepare( “SELECT DISTINCT user_id FROM wp_usermeta WHERE meta_key = ‘pie_address_3’ AND meta_value LIKE %s “, ‘%’ . $search . ‘%’ ); $ids = $wpdb->get_results($query); ?> <ul class=”author-list”> <?php foreach ($ids as $id) { ?> <li> <img width=”90″ height=”90″ src=”https://wordpress.stackexchange.com/questions/182955/<?php echo get_user_meta($id->user_id,”pie_profile_pic_5″, true); ?>” class=”attachment-agent-image wp-post-image”> … Read more

Multiple navigation menus to a location?

is this look like the menu you aiming ? Here how to create it Create custom menu in your functions.php , // main menu function main_nav() { wp_nav_menu( array( ‘theme_location’ => ‘header-menu’, ‘menu’ => ”, ‘container’ => ‘div’, ‘container_class’ => ”, ‘container_id’ => ”, ‘menu_class’ => ‘menu’, ‘menu_id’ => ”, ‘echo’ => true, ‘fallback_cb’ => … Read more

How to add rewrite rules and pagination to retrieve attachments files?

Based on the comments of @Milo and using the rewrite analyzer plugin I found what I understand as a conflict in the rewrite rules?. The following url: exams/high-school/city-name/subject/math/ matches the following rules Pattern: (.?.+?)/page/?([0-9]{1,})/?$ Subtitution: pagename: exams/high-school/city-name/subject/math paged: 1 Pattern: (.?.+?)(/[0-9]+)?/?$ Subtitution: pagename: exams/high-school/city-name/subject/math/page page: /1 Pattern: exams/([^/]+)/([^/]+)/subject/([^/]+)/?$ Subtitution: pagename: examns level: high-school city: city-name … Read more

custom_list_table edit/delete bulk actions

above is my check box, normally name=”book[]” can someone explain what the purpose of the [] is? This is allowing the checked values to be returned as an array when getting the results, if you have more than one value checked. Besides that, I can’t tell what you’re trying to do in order to be … Read more

How do I remove the entire left nav bar in admin for certain level users?

You could creatively use output caching to capture the adminbar and then discard it like so: <?php // this filter runs in menu-header.php L37 right before the admin menu is rendered add_filter( ‘parent_file’, function( $parent_file ){ ob_start(); return $parent_file; } ); // runs after the output add_action( ‘in_admin_header’, function(){ ob_clean(); // discard output echo ‘<div … Read more