-
AuthorPosts
-
July 30, 2014 at 2:02 am #75284
Hello X Team,
I recently purchased an X theme. I am facing many problems with the theme to setup a WordPress blog Tech Knol.
Problem 1: I’m seeing thumbnails for every post with post excerpt on my homepage. Im ok with that but I’m seeing large featured image at the beginning of the post which I don’t want to see. I tried removing featured image for a post then it also removed thumbnail preview for that particular post on homepage. Also I tried to remove featured image code from content.php which removed post thumbnails and featured images everywhere in the blog. I want remove only featured images at the beginning of every blog post.Problem 2: I have over 130 posts in my blog. I want social sharing buttons on every blog post and page, how to get those buttons?
Problem 3: I want published author name, date, category and comments count after every blog post heading, how to get that?
For time being kindly address all these issues.
July 30, 2014 at 9:26 pm #75749Hi there,
Thank you for dropping by!
1. You can achieve this in two ways.
a. Add this css at your customizer’s custom css.
.single-post .entry-featured { display: none; }
b. directly edit your content.php as you mentioned and apply this coding.
<?php if ( has_post_thumbnail() && !is_singular() ) : ?> <div class="entry-featured"> <?php x_featured_image(); ?> </div> <?php endif; ?>
2. First, have a child theme. Then add this code at your child theme’s functions.php
add_filter('the_content', function($content){ return $content.'[share title="Share this Post" facebook="true" twitter="true" google_plus="true" linkedin="true" pinterest="true" reddit="true" email="true"]'; });
3. Add this too under child theme’s functions.php
add_filter('the_content', function($content){ return $content.( is_singular() ? '[author title="About the Author"]' : '' ); });
Hope these helps 🙂
July 31, 2014 at 2:38 am #758572. When I updated my functions.php file with your code I’m getting 500 server error. I tried modifying the code. Which is also throwing error. I want social sharing buttons below the post heading and before the author box.
add_filter('the_content', function($content){ return $content.( is_singular() ? '[share title="Share this Post" facebook="true" twitter="true" google_plus="true" linkedin="true" pinterest="true" reddit="true" email="true"]' : '' ); });
3. I think you didn’t get what I explained in my 3rd point. I need a timestamp, Which is the author name, date, category and comments count below the post heading as shown in below image.
When a visitor clicks the author it should go to authors profile page which will display list of posts published by the author Ex: Anil Anvesh
When a user clicks on the category it should go to the category page displaying the posts and that particular category. Ex: SEO
July 31, 2014 at 6:48 pm #76243Hi Anilan,
2. There these approach will not gonna work. That area is post heading which different section from the post.
And this may not effective for all post formats.
Instead, edit this template _content-post-header.php and add this code before or after
</header>
<?php echo do_shortcode('[share title="Share this Post" facebook="true" twitter="true" google_plus="true" linkedin="true" pinterest="true" reddit="true" email="true"]'); ?>
3. You can just enable post meta at Admin > Customizer > Blog > Enable Post Meta, all stack have this.
Thanks!
-
AuthorPosts