Site logo

[Resolved] Dynamic author Profile creating – RankMath Meta Fields

Home Forums Support [Resolved] Dynamic author Profile creating – RankMath Meta Fields

Home Forums Support Dynamic author Profile creating – RankMath Meta Fields

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #2481702
    Chetan Patil

    Hi,

    I am creating an author Profile for the website. I am able to get Facebook field in the social media links. But I am not able to pull Email and twitter links. (It is pulling wrong records)
    Backend –> https://prnt.sc/Y9T9jBNrA47y
    Frontend –> https://prnt.sc/JTuEO-6remL9

    Please check the url: https://fiverr.startupwebsite.net/best-websites-to-stream-ufc-fights-for-free/

    I am using rankmath SEO plugin.

    Please let me know what meta field values to put for Email and twitter links.

    Regards

    #2482021
    David
    Staff
    Customer Support

    Hi there,

    the email is core wp user meta field, and you can use user_email as your Author Meta field name.
    The Twitter field though is not a core field, i assume it comes from rankmath, can you ask there support for the meta field name

    #2482316
    Chetan Patil

    Hi,

    Thank you for your response.

    I have added the same field name. But I am not getting the output as expected. It displays the part which is after @ and not the complete email. Please fix the email field. I will manage twitter.

    I have attached a screenshot (https://prnt.sc/cDEMvlbnIrXo) of the settings what I have done.

    I have also created the credentials for you on the website.

    Looking forward for your response.

    Regards

    #2482446
    David
    Staff
    Customer Support

    The dynamic data in GB/GP simply retrieves the value within the specified meta field using core WP functions.
    It doesn’t interfere with those values in anyway, such as trimming the text of swapping the value.

    So if you’re getting a different result then there is some other plugin/function that is interfering with it.
    You can test this by temporarily disabling other plugins / custom functions.

    #2482482
    Chetan Patil

    Hi,

    Thank you for your response. I disabled all plugins except GB and GPP. (https://pasteboard.co/EdJOelvsU3CT.png)
    Still result is the same.

    There is no child theme and no custom functions.
    Please check and let me know.

    Regards

    #2482585
    Ying
    Staff
    Customer Support

    For email, try using GB’s dynamic data option, you should be able to choose email as the link type:
    https://www.screencast.com/t/SwNgXYAkd52Z

    #2488485
    Chetan Patil

    I created using JetEngine and Linked. Thank you,

    #2489467
    Ying
    Staff
    Customer Support

    You are welcome   🙂

    #2489728
    Chetan Patil

    Hi,

    I am using yoast seo plugin and i am able to pull the email and facebook field in the author profile template.
    But when I am trying to get the twitter url it is showing only username with @. (https://prnt.sc/ouAE2ZuBABZA)

    Is there any way by which we can replace this “@” with “https://twitter.com” ?

    Here is the link on which I am working on: http://jes.15.206.175.162.nip.io/2022/12/28/hello-world/

    Regards

    #2489765
    Fernando
    Customer Support

    Hi Chetan,

    There is a way. To do so, add cu-headline-replace to the classist of the Headline Block for the Twitter URL.

    Adding Custom Classes: https://wordpress.com/support/wordpress-editor/adding-additional-css-classes-to-blocks/

    Then, add this snippet:

    add_filter( 'render_block', function( $block_content, $block ) {
        if ( !is_admin() && ! empty( $block['attrs']['className'] ) && strpos( $block['attrs']['className'], 'cu-headline-replace' ) !== false ) {
    		$myreplace = '@';
    		$myinsert = 'ADD WHAT YOU WANT TO REPLACE HERE';
            $block_content = str_replace( $myreplace, $myinsert , $block_content );
    		
    		
        }
    
        return $block_content;
    }, 10, 2 );

    Insert the text you which to replace @ with as specified in the code.

    Adding PHP: https://docs.generatepress.com/article/adding-php/#code-snippets

    #2489834
    Chetan Patil

    Hey Fernando,
    This is a great solution.
    Thank you.

    #2490764
    Fernando
    Customer Support

    You’re welcome, Chetan!

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.