• Resolved phanngocvy27

    (@phanngocvy27)


    Dear support team,
    Sorry for bother you,
    please help me out,
    your plugin ‘s so great but there is a issue at tab browser name of profile page,
    I just custom it, and it works if i do it directly at class-profile-magic-public.php, but in function.php of child theme, it does not,
    Please help me out
    Below is what i’ve done
    add_filter( ‘pg_user_profile_pagetitle’,’custom_profile_title’ );
    function custom_profile_title ($title, $sep = ”) {
    //code here
    }
    return $title;
    }

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author ProfileGrid Support

    (@profilegrid0)

    Hello @phanngocvy27,

    We checked your code and found that you are using a hook ‘pg_user_profile_pagetitle’, which is not declared as a hook in the plugin code. It is a function that we are using for WordPress hook ‘wp_title’, this is why the code is not working.

    Please use the below code and check:

    add_filter(‘wp_title’, ‘custom_profile_title’, 99999999, 2 );
    function custom_profile_title ($title, $sep = ”)
    {
    //code here
    }
    return $title;
    }

    Let us know if you still face any issues.

    Thread Starter phanngocvy27

    (@phanngocvy27)

    Dear support team,
    Thank you for your response so quick, but that does not work with “wp_title”, and works with ‘pre_get_document_title’, i dont know, just for someone struggling with that.
    The name of profile page on tab browser did not change when users changed their display name, accordingly,
    Just for your information.
    Thank you so much

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom function in function.php’ is closed to new replies.