• Resolved bharti18

    (@bharti18)


    Hello,

    Im using Ultimate member plugin free version. I have a doubt, i also using ACF fields plugin in my wordpress. Can i add your ultimate member profile form into any of my custom post type? Will it work? Instead of editing from edit user, can i have this from backend admin?

    Thank you

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter bharti18

    (@bharti18)

    Thank you, I have one more question. Under Ultimate member settings, we have SEO meta title, description, indexing with dynamic content. My question is, Can we give SEO settings separately to users? I mean, in my website, users has their own dashboard. I wish to give the SEO settings in admin dashboard, where, users can add their own meta title,description all…. Is it possible? or Can i create ACF custom post type for this? will it work?

    @bharti18

    You have the documentation here about “Short Tags for SEO”

    https://docs.ultimatemember.com/article/218-ultimate-member-short-tags-for-seo-title-and-menu-titles

    The tags list is outdated, these are the tags from current version of UM:

    $search = array(
    		'{display_name}',
    		'{first_name}',
    		'{last_name}',
    		'{gender}',
    		'{username}',
    		'{email}',
    		'{site_name}',
    		'{user_account_link}',
    	);

    There is also a tag {usermeta:here_any_usermeta_key}
    You can add custom tags, which can be user specific, by these UM filters

    * add_filter( 'um_template_tags_patterns_hook', 'my_template_tags_patterns', 10, 1 );
    	 * function my_template_tags_patterns( $placeholders ) {
    	 *     // your code here
    	 *     $placeholders[] = '{my_custom_placeholder}';
    	 *     return $placeholders;
    	 * }
    * add_filter( 'um_template_tags_replaces_hook', 'my_template_tags_replaces', 10, 1 );
    	 * function my_template_tags_replaces( $replace_placeholders ) {
    	 *     // your code here
    	 *     $replace_placeholders[] = 'my_replace_value';
    	 *     return $replace_placeholders;
    	 * }

    @bharti18

    You can try this code snippet, which will use two text fields from your User dashboard for the custom Title and Description by each User entry.

    Meta keys for the text fields are my_seo_title and my_seo_desc

    If the fields are empty default values are used.

    {display_name} | {site_name}
    {display_name} is on {site_name}. Join {site_name} to view {display_name}'s profile

    Test of the User description from the Profile field
    {display_name} is on {site_name} and my birthdate is {usermeta:birth_date}

    add_filter( 'um_template_tags_patterns_hook', 'my_template_tags_patterns', 10, 1 );
    
        function my_template_tags_patterns( $placeholders ) {
            $custom_tags = array( '{my_seo_title}', '{my_seo_desc}' );
            return array_merge( $custom_tags, $placeholders );
        }
    
    add_filter( 'um_template_tags_replaces_hook', 'my_template_tags_replaces', 10, 1 );
    
        function my_template_tags_replaces( $replace_placeholders ) {
            $custom_replace = array();
            $custom_replace[] = ( ! empty( um_user( 'my_seo_title' ))) ? um_user( 'my_seo_title' ) : "{display_name} | {site_name}";
            $custom_replace[] = ( ! empty( um_user( 'my_seo_desc' )))  ? um_user( 'my_seo_desc' )  : "{display_name} is on {site_name}. Join {site_name} to view {display_name}'s profile";
            return array_merge( $custom_replace, $replace_placeholders );
        }

    Install by adding the code snippet to your active theme’s functions.php file
    or use the “Code Snippets” Plugin

    https://www.ads-software.com/plugins/code-snippets/

    Edit:
    You must also update the current SEO fields in
    UM Settings -> General -> Users where you use the new tags

    {my_seo_title} {my_seo_desc}
    for “User Profile Title” and “User Profile Dynamic Meta Description”

    • This reply was modified 7 months, 3 weeks ago by missveronica.
    Plugin Support andrewshu

    (@andrewshu)

    Hi @bharti18

    This thread has been inactive for a while so we’re going to go ahead and mark it Resolved.

    Please feel free to re-open this thread if any other questions come up and we’d be happy to help. ??

    Regards

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Ultimate member profile form’ is closed to new replies.