kertoon Posted April 21, 2015 Share Posted April 21, 2015 I have this social sharing buttons which appear in both blog post and the PAGES. How do I set it so that they do not appear on the pages? Here is the code: function crunchify_social_sharing_buttons($content) { // Show this on post and page only. Add filter is_home() for home page if(is_singular()){ // Get current page URL $shortURL = get_permalink(); // Get current page title $shortTitle = get_the_title(); Link to comment Share on other sites More sharing options...
mannemvamsi Posted April 21, 2015 Share Posted April 21, 2015 Use this function. is_singular( 'post' ); Btw, this question is something related wordpress support I guess. :-) Link to comment Share on other sites More sharing options...
kertoon Posted April 22, 2015 Author Share Posted April 22, 2015 Yes, it works perfectly. Anyway, thanks for highlighting to me. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now