Black Friday Sale! Get up to $40 off GP Premium!Learn more

[Resolved] Multiple Queries. Help Needed!

Home Forums Support Multiple Queries. Help Needed!

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #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
    ExamScoop

    GP Premium 1.4.3
    #393273
    Narender

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

    #393280
    Tom
    Lead Developer
    Lead Developer

    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?

    #393287
    Narender

    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

    #393324
    Tom
    Lead Developer
    Lead Developer

    1. 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/

    #393367
    Narender

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

    #393997
    Tom
    Lead Developer
    Lead Developer

    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' );
        }
    }
    #394004
    Narender

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

    #394009
    Tom
    Lead Developer
    Lead Developer

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

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

    #394030
    Narender

    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 πŸ™

    #394265
    Tom
    Lead Developer
    Lead Developer

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

    #394543
    Narender

    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

    #394561
    Tom
    Lead Developer
    Lead Developer

    Ugh – sorry about that.

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

    Sorry for the inconvenience!

    #394750
    Narender

    Thanks a ton buddy. It worked great πŸ™‚

    #394834
    Tom
    Lead Developer
    Lead Developer
Viewing 15 posts - 1 through 15 (of 15 total)
  • You must be logged in to reply to this topic.