Tagged: x
-
AuthorPosts
-
May 23, 2016 at 3:52 pm #1005980
ecomalleyParticipantWhere can I edit X’s default format for a singe blog post – eg – I want the author bio displayed, I want some social sharing options displayed, etc.
Thanks.
Ed
May 23, 2016 at 9:18 pm #1006432
Prasant RaiModeratorHello There,
Thanks for writing in!
Because this requires a template change, I’d advise that you setup a child theme. This allows you to make code changes that won’t be overwritten when an X update is released.
After that kindly add the code below in your child theme functions.php file.
1) To display social share:
add_action('x_before_the_content_end', function() { echo do_shortcode('[share title="Share this Post" facebook="true" twitter="true" google_plus="true" linkedin="true" pinterest="true" reddit="true" email="true"]'); });2) To display author bio on blog posts:
// Author Field below the post content - Single page only. // ============================================================================= add_filter( 'the_content', 'custom_author_code'); function custom_author_code($content) { if ( is_single() ) { return $content . do_shortcode('[author title="About the Author"]'); } else { return $content; } }Thanks.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1005980 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
