Archived topic
Connecting Comments Together
7 replies · Started by Sam on August 21, 2018
Hi GP team,
Need your expertise again. I'm looking for a way to create a comment section that is integrated with the blog post like this, and allows me to input social share buttons as per what you see:
https://bit.ly/2LeGWcW (please scroll down to the bottom)
I wonder how can it be done? (inclusive of PHP or CSS)
Please see: https://drive.google.com/file/d/13pU0faUF-iAyDuEU6rSF4G-mbJQaSoAd/view?usp=sharing&e=
Thank you so much!
Hi there,
Try this CSS:
.single .site-main > .post {
margin-bottom: 0;
}
.comments-title {
border-top: 1px solid #ddd;
border-bottom: 1px solid #ddd;
padding-top: 30px;
padding-bottom: 30px;
}
As for the social icons - are you using a plugin for that right now? If so, do you just need to know how to insert them into that area?
Let me know :)
Hi Tom,
Thanks for your reply.
Let's assume I don't have anything installed right now; how would I go about inserting them in the order shown in the example? Thank you!
Hi there,
you could add a shortcode from your social sharing plugin to a Elements > Hook - Location: below comments title.
Then we could apply some CSS to float it right of the title. But we would need to see the site to target the correct classes.
Hi David! I've managed to get the social icons installed, as shown here:
https://drive.google.com/file/d/1dv_nLoUZ2I_-pnQITksOU6Tx8zkqEFYU/view?usp=sharing
However, a few more issues persist:
1. As mentioned, I need to shift the icons to the right of the comments
2. I need to limit icons to just 2 - how would I go about doing that? The plugin does not show any instructions.
3. I need to change the "3 thoughts on..." text to display the number of comments, very much like the other thread with the Blog Page comments sections which you very kindly helped. I should be able to style and color this comments individually (Number) and the word (Comment)
Thank you so much for your patience!
1. Any chance you can link us to the post?
2. This depends on the plugin - which one are you using?
3. This should help when changing the text: https://generatepress.com/forums/topic/feature-request-itemprop-we-can-use-as-filter-help/#post-646439
In that example, %1$s is the number of comments.
Hi Tom, added the code that you mentioned with no avail.
Here's what I added:
add_filter( 'gettext', function( $text ) {
if ( 'One thought on “%s”' === $text ) {
return 'Your new text';
}
if ( '%1$s thought on “%2$s”' === $text ) {
return 'Your new text';
}
if ( '%1$s thoughts on “%2$s”' === $text ) {
return 'Your new text';
}
} );
It did nothing to the site. Wonder what I did wrong there?
Hmm, try this instead: https://generatepress.com/forums/topic/removing-comment-title-thoughts-on/#post-327453