Site logo

Archived topic

Multiple Queries. Help Needed!

14 replies · Started by Narender on September 27, 2017

Viewing posts 1–15 of 15

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
ExamScoop

Bump! Please somebody provide the solution. That's urgent.

Hi 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?

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/21b8e4b706caf59470b7

Thanks a lot for the help Tom. Emailed for Beta Version.

Wanted 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' );
    }
}

Hey Tom,
Thanks for the code but have you tried it? It's removing Entry Meta even from article pages.

! is_singular() means it will only apply to non-singular pages and posts.

Are the options enabled in Customize > Blog > Blog Content?

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 :(

Hmm.. I just edited the code above - can you give it a shot?

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

Ugh - sorry about that.

I just adjusted it above and tested it - fully working.

Sorry for the inconvenience!

Thanks a ton buddy. It worked great :)

Glad I could help :)

This archived topic is closed to new replies.