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 show custom post type in all post section?

It seems pretty hacky, but this does work in my testing (I tested with built-in page post type): // Change the post list and search query. add_action( ‘pre_get_posts’, static function ( $query ) { if ( ! is_admin() || ! $query->is_main_query() ) { return; } if ( ! in_array( $query->get( ‘post_type’ ), array( ‘post’, ‘Array’ … Read more

How could i add username field in WooCommerce

// Add Username Field to Registration Form add_action( ‘woocommerce_register_form_start’, ‘custom_woocommerce_register_username’ ); function custom_woocommerce_register_username() { ?> <p class=”form-row form-row-wide”> <label for=”reg_username”><?php _e( ‘Username’, ‘woocommerce’ ); ?> <span class=”required”>*</span></label> <input type=”text” class=”input-text” name=”username” id=”reg_username” value=”<?php echo ( ! empty( $_POST[‘username’] ) ) ? esc_attr( wp_unslash( $_POST[‘username’] ) ) : ”; ?>” /> </p> <?php } // Validate … Read more

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