- This topic has 11 replies, 3 voices, and was last updated 4 years, 6 months ago by Tom.
-
AuthorPosts
-
September 19, 2019 at 6:35 pm #1014076Mark
Hi,
I’ve been building a site for a few days solid now and am very nearly finished, there’s just a few of things I need to clean up if possible, but am stumped after many hours of trying:
- What part of the theme code creates the ‘category description’? I normally add ‘and !is_paged()’ to to the code, so the category description only appears on page one of the paginated series. I can’t seem to find it.
- In the comment section, the date the user posted a comment is linked to their comment. How can I ‘unlink’ the date please? (Leave the date, but it links nowhere.) It’s not good SEO to have so many unnecessary links on heavily commented pages.
- On category pages, where you have a blogroll of up to, say, 10 posts…on every single one, the authors name is hyperlinked to their author page. How can I unlink their name please? (again, it’s just bad for SEO to have so many unnecessary links.)
- On my sites, at the end of every post, I am using the WP Show posts Pro plugin to show related posts. It’s injecting a pipe character at the end of the date: Why is this, and how can I remove it please? A couple of examples: https://cl.ly/51ed931284a3 , https://cl.ly/43306fed10d7 – but you can see it on any post.
- On the category pages on my site where you have the blogroll / list of posts (below any intro text I have added), the individual posts listed in a grid have a weird space to their left that shouldn’t be there, like a margin all the way down the left side, where the images touch the edge of the screen on the right. On firefox browser made small enough for mobile, or on mobile (chrome on samsung galaxy S8 and S10) you can see it, though you cannot on chrome desktop. Why is this spacing there please? I have removed all custom CSS and it still persists, so I’m stumped. Can we remove it and ‘center’ the blogroll posts?
- On category pages, how can I target margins / padding on the blogroll section only? What IDs or classes will allow me to put margins to the side of the blog post list only, without adjusting spacing at the side of the intro text? I’ve tried for a good couple of hours…but failed π
-
Thanks in advance for any help and pointers you can give!
September 20, 2019 at 3:06 am #1014261DavidStaffCustomer SupportHi there,
Lets deal with the first 4 to begin with:
1. You can use the filter Tom provides here to remove the description:
https://generatepress.com/forums/topic/category-description-is-showing-twice-in-2-3/#post-918745
2. Comments link – you would need to use a child theme copy of the includes/structure/comments.php and edit this line:
3. This snippet:
https://gist.github.com/generatepress/67fb28af5c8be31032904. Thats peculiar – not experienced that, are there any custom functions at play? If not you can use css to remove it – class is:
wp-show-posts-separator
September 20, 2019 at 3:55 am #1014292MarkHi David,
Thanks for your help! I just logged into the forum and thought I would scroll through to find my posts and say you’re a crazily busy man! Makes my head hurt just thinking about it, haha.
Anyway…
1. Worked perfectly, thank you.
2. When you say ‘edit this line’ – what edit would i make please?
3. Worked perfectly, thank you.
4. To display WP Show posts, I’m hooked into ‘after_content’ with the following code to display the posts:
<div class="wpsp-related-posts grid-container"> <h2>You May Also Like:</h2> <?php if ( is_single() ) { $cats = get_the_category(); $cat = $cats[0]; } else { $cat = get_category( get_query_var( 'cat' ) ); } $cat_slug = $cat->slug; $list = get_page_by_title( 'related', 'OBJECT', 'wp_show_posts' ); wpsp_display( $list->ID, 'tax_term="' . $cat_slug . '"' ); ?> </div>
I use these settings to show the meta: https://cl.ly/4739a56dfa8a
And when I do, I get that pipe character at the end of the meta as seen here: https://cl.ly/70b3f0d4acc0
Odd one.
How would knowing the CSS class help to remove it? Surely I can only show or hide the whole thing, whereas I’d like the meta shown, it just shouldn’t have that pipe character at the end.
Thanks,
Mark.September 20, 2019 at 4:03 am #1014303DavidStaffCustomer Support2. You would replace that line with:
<span class="comment-time">
and replace the closing</a>
with</span>
4. This CSS will hide just the separator:
.wp-show-posts-separator { display: none; }
September 20, 2019 at 4:22 am #1014318MarkHi David,
2: I copied the comments.php file, and added it to my child theme in folders I created to mimic the parent theme structure like so:
generatepress_child/inc/structure/comments.php
I then edited line 44 to be what you suggested, and changed the closing tag (line 53) to a closing </span> tag…but it’s had no effect?
4. That CSS worked perfectly, thank you π
September 20, 2019 at 9:52 am #1014669DavidStaffCustomer SupportCan you move your comments.php to the root of the child theme ie. generatepress_child-child/comments.php
September 21, 2019 at 10:46 am #1015416MarkThe whole site in the front end goes a bit weird when I do that: All boxed, CSS looks broken, message displays at the bottom of the page like this: https://cl.ly/4a51cdc9f6c3
September 21, 2019 at 4:13 pm #1015555DavidStaffCustomer SupportPlace it back in the inc/structure folder and then remove these lines:
/** * Comment structure. * * @package GeneratePress */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. }
September 21, 2019 at 5:25 pm #1015579MarkHi David,
No effect seen, date is still a link.
September 22, 2019 at 3:03 am #1015733DavidStaffCustomer SupportCan you share me a link to the site?
October 11, 2019 at 3:59 am #1031874MarkHi David,
Sorry for the silence, I took a holiday…probably needed it after all the site rebuilding, haha.
Anyway, back to it. Yes, I can share a link but would prefer not to publicly? Is there a way to share it privately?
Thanks,
Mark.October 11, 2019 at 9:33 am #1032212TomLead DeveloperLead DeveloperHi Mark,
You can edit your original post in this topic and add the URL to the private URL field π
-
AuthorPosts
- You must be logged in to reply to this topic.