Viewing 10 replies - 1 through 10 (of 10 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Author images usually come from gravatar.com. What do you mean by “add verify”?

    Thread Starter PCBOKS SYSTEM

    (@bokyox15x)

    Add verify mark(check sign) with the name of role

    Thread Starter PCBOKS SYSTEM

    (@bokyox15x)

    See this example:
    The example image

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    If you’re using buddypress, check this plugin: https://wordpress.org/plugins/buddypress-verified/

    Otherwise, you’d need to edit the PHP where the author is displayed to add the checkmark if the author has a specified role. Be sure to modify code in a child theme.

    Thread Starter PCBOKS SYSTEM

    (@bokyox15x)

    not using another plugin just code only image with author role.

    Thread Starter PCBOKS SYSTEM

    (@bokyox15x)

    See this example:
    The example image

    • This reply was modified 6 years, 5 months ago by PCBOKS SYSTEM.
    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    I think you’d need to edit the template used to display authors on your site (in a child theme) and add the checkmark as a customization.

    Thread Starter PCBOKS SYSTEM

    (@bokyox15x)

    Example the code

    function change_role_name() {
        global $wp_roles;
    
        if ( ! isset( $wp_roles ) )
            $wp_roles = new WP_Roles();
    
        //You can list all currently available roles like this...
        //$roles = $wp_roles->get_names();
        //print_r($roles);
    
        //You can replace "administrator" with any other role "editor", "author", "contributor" or "subscriber"...
        $wp_roles->roles['administrator']['name'] = 'Super Administrator'<img src="checkmark.jpg" alt="Super Admin" />;    
        $wp_roles->role_names['administrator'] = 'Super Administrator'<img src="checkmark.jpg" alt="Super Admin" />;           
    }
    add_action('init', 'change_role_name');
    Thread Starter PCBOKS SYSTEM

    (@bokyox15x)

    function change_role_name() {
    global $wp_roles;

    if ( ! isset( $wp_roles ) )
    $wp_roles = new WP_Roles();

    //You can list all currently available roles like this…
    //$roles = $wp_roles->get_names();
    //print_r($roles);

    //You can replace “administrator” with any other role “editor”, “author”, “contributor” or “subscriber”…
    $wp_roles->roles[‘administrator’][‘name’] = ‘Super Administrator’Super Admin;
    $wp_roles->role_names[‘administrator’] = ‘Super Administrator’Super Admin;
    }
    add_action(‘init’, ‘change_role_name’);

    Thread Starter PCBOKS SYSTEM

    (@bokyox15x)

    that is my example code but wrong plss fix that

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘How to add verify icon in about author template’ is closed to new replies.