- This topic has 14 replies, 2 voices, and was last updated 7 years, 6 months ago by
Tom.
-
AuthorPosts
-
September 27, 2017 at 6:25 am #392801
Narender
Hey Tom,
I have been using Genesis Framework for the last 3 years. I was looking for a Theme Framework which is having something more to offer and found the GeneratePress and quickly switched to it.
I bought the Premium Version and tried to customize the Theme as per my needs but I am having some issues that I would like to get resolved. Instead of creating a separate Thread for each of the issues, I am listing all of them here.
1. How to Remove Author Name, Post Date, Tags, Categories, Comment Link from Homepage, Archive Pages but Keep on Single Article pages?
2 How to Show “Leave a Comment” and “Post Category” Links below the Article Title on Single article pages and show Post Publishing Date, Author Name in the Entry Footer?
3 How to Move Article Pagination (Next, Previous) Links below the Comment Form?
4 Completely Remove “%Number%” thought on “Random Blog Post Name” Above the Comments?
5 How to highlight Author’s Comment? I want to add a Border on the Top of Author’s Comment like this one
.bypostauthor {border-top: 10px solid #e18728;}
Keen Regards,
Narender Chopra
ExamScoopSeptember 27, 2017 at 8:13 pm #393273Narender
Bump! Please somebody provide the solution. That’s urgent.
September 27, 2017 at 8:31 pm #393280Tom
Lead DeveloperLead DeveloperHi there,
1. Currently you’d need to use a filter. However, this kind of functionality has been added in GPP 1.5, which is about to enter beta testing.
2. This should do it:
add_action( 'after_setup_theme', 'tu_move_entry_meta' ); function tu_move_entry_meta() { if ( is_single() ) { remove_action( 'generate_after_entry_title', 'generate_post_meta' ); add_action( 'generate_after_entry_content', 'generate_post_meta' ); remove_action( 'generate_after_entry_content', 'generate_footer_meta' ); add_action( 'generate_after_entry_title', 'generate_footer_meta' ); } }
3. Add this CSS:
footer.entry-meta .post-navigation { display: none; }
Then add this:
add_action( 'generate_after_main_content', 'tu_move_single_post_pagination' ); function tu_move_single_post_pagination() { if ( is_single() ) { generate_content_nav( 'nav-below' ); } }
4. You would likely need to copy comments.php (https://github.com/tomusborne/generatepress/blob/1.4/comments.php) and add it to your child theme. Then adjust the text as needed.
You could also try a plugin like this: https://en-ca.wordpress.org/plugins/say-what/
5. That CSS should apply to GP. Can you link me to a post where it’s not working?
September 27, 2017 at 8:51 pm #393287Narender
Hey Tom,
Thanks a ton for the solutions.1. May you please provide the Function for the First Query? I want to have the minimal links on archives, homepage 🙂
Query No 2, 3 and 4 have been solved 🙂
Query No 5: Here is the post link where the Author Highlight CSS is not working: https://www.examscoop.in/fci-chhattisgarh/
.bypostauthor {border-top: 10px solid #e18728;}
Only the Border Top isn’t working. Border-Left, Right, or bottom works well.
One More Query- May you please tell me where to add the following coding to Remove the Links from Comments:
https://gist.github.com/generatepress/21b8e4b706caf59470b7September 28, 2017 at 12:09 am #393324Tom
Lead DeveloperLead Developer1. It would be easier to use the GPP 1.5 beta – email me if you’d like me to send it over: https://generatepress.com/contact
5. Try this instead:
#comments .bypostauthor { border-top: 10px solid #e18728; }
6. That code can be added using one of these methods: https://docs.generatepress.com/article/adding-php/
September 28, 2017 at 1:43 am #393367Narender
Thanks a lot for the help Tom. Emailed for Beta Version.
September 28, 2017 at 10:22 pm #393997Tom
Lead DeveloperLead DeveloperWanted to put a little more time into beta, so here’s the function:
add_action( 'wp', 'tu_remove_meta_on_archives' ); function tu_remove_meta_on_archives() { if ( is_home() || is_archive() ) { add_filter( 'generate_post_date', '__return_false' ); add_filter( 'generate_post_author', '__return_false' ); add_filter( 'generate_show_categories', '__return_false' ); add_filter( 'generate_show_tags', '__return_false' ); add_filter( 'generate_show_comments', '__return_false' ); } }
September 28, 2017 at 11:10 pm #394004Narender
Hey Tom,
Thanks for the code but have you tried it? It’s removing Entry Meta even from article pages.September 28, 2017 at 11:21 pm #394009Tom
Lead DeveloperLead Developer! is_singular()
means it will only apply to non-singular pages and posts.Are the options enabled in Customize > Blog > Blog Content?
September 29, 2017 at 12:17 am #394030Narender
Yes, the options are Enabled already and I pasted the code in functions.php as it is but it’s removing the Entry Meta from everywhere 🙁
September 29, 2017 at 8:55 am #394265Tom
Lead DeveloperLead DeveloperHmm.. I just edited the code above – can you give it a shot?
September 29, 2017 at 8:05 pm #394543Narender
Hey Tom,
Seems there is a problem with your Modified code. My website isn’t opening (Error 500) after adding the new code in functions.php
September 29, 2017 at 9:47 pm #394561Tom
Lead DeveloperLead DeveloperUgh – sorry about that.
I just adjusted it above and tested it – fully working.
Sorry for the inconvenience!
September 30, 2017 at 7:17 am #394750Narender
Thanks a ton buddy. It worked great 🙂
September 30, 2017 at 9:06 am #394834Tom
Lead DeveloperLead DeveloperGlad I could help 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.