How do I create a custom search function to only show contact information if they search for an exact unique identifier?

Here is one way I can think to do this. Make a new post for each attendee. The post title should be their unique identifier that you assign them. Rather than manually creating all those posts, you might find it easier to create a spreadsheet and import. Each posts’ content would be the contact info … Read more

Want to block all posts of spacific author via robots.txt file

You should use the robots_txt filter to exclude all of the URLs of posts written by specified author (untested): add_filter( ‘robots_txt’, static function ( $output ) { $query = new WP_Query( array( ‘author’ => 3, ‘posts_per_page’ => -1, ‘no_found_rows’ => true, ‘fields’ => ‘ids’, ) ); if ( ! $query->have_posts() ) { return $output; } … Read more

This plugin helps create custom buddypress group tabs but it is producing a 404 error, how can it be edited, is it the screen_function?The code is i

you can use the code below, I edited it to work <?php /* Plugin Name: Custom BuddyPress Group Tabs Description: Adds custom tabs to BuddyPress groups Version: 1.0 Author: Bing */ // create the custom database table upon plugin activation function asdf_group_tabs_install() { global $wpdb; $table_name = $wpdb->prefix . ‘custom_group_tabs’; $charset_collate = $wpdb->get_charset_collate(); $sql = … Read more

How to retrieve blog language without any region (locale) attached?

I’m posting this at the request of one of our Discord users, who doesn’t use WPSE: Stack Overflow / Stack Exchange is kind of a bizarre place. Why is that question voted “-2”? The question is basically asking more or less the same thing that multiple WordPress tickets are asking for: https://core.trac.wordpress.org/ticket/48152 https://core.trac.wordpress.org/ticket/50183 Also the … Read more

Do not allow the creation of an administrator remotely

Here is a short script that prevents unapproved admins from logging in. Of course it is possible to add multiple login names. add_filter( ‘authenticate’, ‘auth_signon’, 30, 3 ); function auth_signon( $user, $username, $password ) { if( strtoupper($username) !== ‘MYLOGINNAME’ && in_array( ‘administrator’, (array) $user->roles )){ wp_logout(); return new WP_Error( ‘broke’, __( $username . “, good … Read more

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