Is there a Wordpress shortcode for the Blog meta data?
At the moment I have it in the standard location under the title, but I want to display it in another location I insert elsewhere into the blog. Is this possible?
Is there a Wordpress shortcode for the Blog meta data?
At the moment I have it in the standard location under the title, but I want to display it in another location I insert elsewhere into the blog. Is this possible?
Hi There,
Please add the following code under functions.php
file locates in your child theme.
add_shortcode( 'x_post_meta', 'x_post_meta' );
function x_post_meta(){
ob_start();
x_integrity_entry_meta();
return ob_get_clean();
}
Then you can use the [x_post_meta]
shortcode.
Regards!
Thank you,
That works, but when I then went to Theme Options > Post Meta and turned it to off (so it doesn’t show under the page title) f, it removes the [x_post_meta] shortcode you helped me create.
Hello There,
Where do you want to display the post meta instead? Could you please guide the location you want so that we can give you a tailored solution to your issue.
Thanks.
Hi,
Thank you, I had wanted to add it in an author row area I had created, just under the name and location. The shortcode works as you can see, it displays exactly as wanted. But because I have left the 'show meta button enabled, it still shows under the page title, which I now want to remove/disable.
Hi,
To remove it, you can add this in Theme Options > CSS
.p-meta {
display:none;
}
Hope that helps.
But that will remove it from both locations. I only want to remove the one under the blog title, no the shortcode placement.
Hi,
Please replace code with this.
.entry-header .p-meta {
display:none;
}
Thanks
Perfect, thank you.
You’re welcome!
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.