Community Forums › Forums › Archived Forums › General Discussion › News Pro Theme – customize category overview
- This topic has 7 replies, 2 voices, and was last updated 9 years, 8 months ago by Mige77.
-
AuthorPosts
-
August 4, 2014 at 1:57 am #116935Mige77Member
Hi,
I
m running a site on News Pro theme. On all category overview pages I
d like to shorten the entry-footer part to remove the meta information about category and tags.URL: http://www.stringworks.ch/musiknews/
Also I`ve tried to include a social media sharing solution via simple "simple hooks", which generally works, but the theme adds the sharing buttons on all overviews and pages too. How can I add the sharing just on article detail level?
Thank you for any help in advance!
Kind regards,
MichaelAugust 4, 2014 at 2:21 am #116936Genesis DeveloperMemberAdd the following code in your functions.php file so category & tags will remove
remove_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_open', 5 ); remove_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_close', 15 ); remove_action( 'genesis_entry_footer', 'genesis_post_meta' );
For social sharing buttons use the conditional tag:
if ( is_singular( array( 'post', 'page')){ // ADD YOUR CODE HERE }
August 5, 2014 at 12:25 am #117124Mige77MemberHi, thank you very much!
That first one worked perfectly. I have to try the second part with the social media buttons too.
Kindly,
MichaelAugust 8, 2014 at 3:13 am #117739Mige77MemberHi,
Thanks again for your advice with the conditional tag. I`ve tried that and used this code:
if ( is_singular( array('post'))){ echo do_shortcode('[socialMediaEnhancer]'); }
This should display the social media sharing buttons. But the output of the plugin is not visible. Do I have to define the exact position of the output somehow in functions.php, where it should be executed on a post page?
KR,
MichaelAugust 8, 2014 at 5:29 am #117740Genesis DeveloperMemberAdd the code in your functions.php file.
add_action('genesis_entry_header', 'add_sharing_button', 30); function add_sharing_button(){ if ( is_singular( array( 'post', 'page')){ echo do_shortcode('[socialMediaEnhancer]'); } }
August 8, 2014 at 9:14 am #117763Mige77MemberHi genwrock
Thank you again for the add sharing function. I have included that on my second website, but it does not seem to work. I`m not getting any error message, but the sharing buttons are not visible:
http://www.michaelherb.ch/globiwanderweg-lenzerheide/
Wondering if it has to do with the shortcode or the plugin itself...
Kind regards,
MichaelAugust 8, 2014 at 9:24 am #117770Genesis DeveloperMemberOho.. this theme is not using HTML5 markup. My code will work for HTML5 site. Ok. Please remove the previous & use this code:
add_action('genesis_before_post_content', 'add_sharing_button', 30); function add_sharing_button(){ if ( is_singular( array( 'post', 'page')){ echo do_shortcode('[socialMediaEnhancer]'); } }
August 9, 2014 at 5:31 am #117882Mige77MemberThanks a lot genwrock!
It all worked perfectly, on both the HTML5 and on the other site. Your help is much appreciated 🙂
KR,
Michael -
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.