Archived topic
Add Fact Checked By: Author Name' With Meta Info
15 replies · Started by Palash on January 18, 2023
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
Hi there,
can you share a link to a post on your site, where you want to add this ?
Sure check this link https://www.galvinpower.org/sub-feed-breaker/
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.
Please share with me the exact setting
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?
No that was only for reference purposes. But you can share me a guide for replacing the default meta info with that I want.
But only change you can keep the author's image of both.
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
I have created this. It appears that the author's post is showing the same for both parts after updating a post.
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
How are you adding that currently? Are you using a Block Element or a code? Can you share it here?
Block Element. According to the Video guidelines.
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
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.'