How can i display pagination in custom comment list?

You should use append paginate_comments_links() into $output like so: add_shortcode ( ‘show_recent_comments’, ‘show_recent_comments_handler’ ); function show_recent_comments_handler( $atts, $content = null ) { extract( shortcode_atts( array( “count” => 20, “pretty_permalink” => 0 ), $atts )); $output=””; // this holds the output if ( is_user_logged_in() ) { global $current_user; get_currentuserinfo(); $args = array( ‘user_id’ => $current_user->ID, ‘number’ … Read more

Adding user metadata to all users

The problem is that you’re using get_current_user_id();. There’s two reasons this is incorrect: The user being created is not necessarily the current user. For example, if an admin creates the user manually. user_register runs immediately after the user is created, but before the user is logged in. So when user_register runs for somebody registering on … Read more

customize Dokan multi vendor: how can i set every Dokan as child of another dokan?

open up store-form.php <div class=”dokan-form-group”> <label class=”dokan-w3 dokan-control-label” for=”dokan_store_name”><?php esc_html_e(‘Store Name’, ‘dokan-lite’); ?></label> <div class=”dokan-w5 dokan-text-left”> <input id=”dokan_store_name” required value=”<?php echo esc_attr($storename); ?>” name=”dokan_store_name” placeholder=”<?php esc_attr_e(‘store name’, ‘dokan-lite’); ?>” class=”dokan-form-control” type=”text”> </div> </div> <!– TODO –> <div class=”dokan-form-group”> <label class=”dokan-w3 dokan-control-label” for=”dokan_store_parent_name”><?php esc_html_e(‘Store Parent Name’, ‘dokan-lite’); ?></label> <div class=”dokan-w5 dokan-text-left”> <input id=”dokan_store_parent_name” required value=”<?php echo … Read more

Creating custom registration and login page in wordpress

Try following Code: <?php $c_user = wp_get_current_user(); if( !is_user_logged_in( $c_user->ID ) ) : wp_register(”, “https://wordpress.stackexchange.com/”); echo ‘<a href=”‘ . esc_url( wp_login_url() ) . ‘” alt=”‘ . esc_attr( ‘Login’, ‘textdomain’ ) . ‘”>’; echo _e( ‘Login’, ‘textdomain’ ); echo ‘</a>’; else : echo ‘Hello <a href=”your_url”>’ . $c_user->display_name . ‘</a>, ‘; echo ‘ <a href=”‘ . … Read more

Automatic registration on main site upon user registration on Multisite

You can hook to wpmu_activate_user and add the user’s role on the main site. add_action( ‘wpmu_activate_user’, ‘wpse363445_add_user_to_main_site’ ); function wpse363445_add_user_to_main_site( $user_id ) { if ( is_main_site() ) { // Don’t run if we’re already on the main site. return; } if ( is_user_member_of_blog( get_main_site_id(), $user_id ) ) { // Don’t add the user to the … Read more

Placeholder text for ajax loaded conditional fields in the registration form

Yes you can add placeholder value after the AJAX is completed and is showing some conditional field. You can write these code in your custom.js file. jQuery(document).ajaxComplete(function(){ jQuery(‘#user_login’).attr(‘placeholder’, ‘User Name’); jQuery(‘#user_email’).attr(‘placeholder’, ‘User Email’); jQuery(‘#user_pass’).attr(‘placeholder’, ‘User Password’); }); You can mention the field id and then mention the placeholder text. Basically these set of code will … Read more

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