Site logo

[Support request] Add Fact Checked By: Author Name’ With Meta Info

Home Forums Support [Support request] Add Fact Checked By: Author Name’ With Meta Info

Home Forums Support Add Fact Checked By: Author Name’ With Meta Info

Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #2499969
    Palash

    Hi,
    I need help adding meta info like the attached screenshot. So when I update a blog post(published by another writer on my site), the meta info will show ‘Fact checked by: Author Name’ automatically. But this option will not show if the same author updates their post.
    I am waiting for your response.
    https://tinyurl.com/2pj58wr2
    Thanks
    Palash

    #2500030
    David
    Staff
    Customer Support

    Hi there,

    can you share a link to a post on your site, where you want to add this ?

    #2501064
    Palash
    #2501068
    Fernando
    Customer Support

    Hi Palash,

    You can use a Block Element – Post Meta Template. Reference: https://docs.generatepress.com/article/block-element-post-meta-template/

    Do you already have a way to add a fact checker per post? If yes, you can use a GenerateBlocks Headline Block to retrieve your custom meta for the author who fact-checked the Post.

    #2501069
    Palash

    Please share with me the exact setting

    #2501084
    Fernando
    Customer Support

    Do you already have a way to add a fact checker per post?

    Moreover, can you also share the link to a post on your site? The one you previously shared seems to be from your reference site still or is that it?

    #2501092
    Palash

    No that was only for reference purposes. But you can share me a guide for replacing the default meta info with that I want.

    #2501093
    Palash

    But only change you can keep the author’s image of both.

    #2501099
    Fernando
    Customer Support

    You’ll need to first find a way to add a Post meta for the post Checker. I’m not sure if there’s a plugin for this. You might need to hire a developer for the best result since this level of customization would be out of our scope of support.

    With ACF, you can add a post meta to add a custom field to manually add the name of the validator.

    See here for more info on how to use ACF: https://www.advancedcustomfields.com/resources/getting-started-with-acf/

    Once you have a custom post meta field for the post validator, you can use a GB Headline Block to retrieve the Post meta dynamically. See here for reference: https://docs.generateblocks.com/article/headline-overview/#dynamic-data

    #2501104
    Palash

    I have created this. It appears that the author’s post is showing the same for both parts after updating a post.

    #2501107
    Palash

    How can I show the author who updated a post in the 2nd section?
    Note- 1st part is working fine.
    https://prnt.sc/ucu_z1n3IkjV

    #2501116
    Fernando
    Customer Support

    How are you adding that currently? Are you using a Block Element or a code? Can you share it here?

    #2501141
    Palash

    Block Element. According to the Video guidelines.

    #2501161
    Fernando
    Customer Support

    Disable the Dynamic settings of the Headline Block for the author modifier text.

    Then, give it a class of add-last-update-user.

    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'], 'add-last-update-user' ) !== false ) {
    		$myreplace1 = 'placeholder';
    		$myinsert1 = get_the_modified_author();
            $block_content = str_replace( $myreplace1, $myinsert1 , $block_content );
        }
    
        return $block_content;
    }, 10, 2 );

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

    #2501170
    Palash

    Maybe not working
    check the screenshot
    https://prnt.sc/MPj42eT_fSGc
    And I have added the code to the theme function.php
    If it is not right, please share with me the screenshot of ‘Disable the Dynamic settings of the Headline Block for the author modifier text.’

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