Site logo

[Support request] How to remove category list post

Home Forums Support [Support request] How to remove category list post

Home Forums Support How to remove category list post

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #1952652
    jose luis

    Hello there!!

    I would like to know how I can remove the list of posts associated with the category page?

    thanks

    #1952658
    Ying
    Staff
    Customer Support

    Hi Jose,

    Not sure I understand your question, can you explain some more and link us to the page in question?

    Let me know 🙂

    #1952900
    jose luis

    Hi! Thanks for your reply.

    This results https://hublocker.net/amazon-locker-madrid/ I only wnat to show mi description.

    #1952951
    Elvin
    Staff
    Customer Support

    Hi there,

    This results https://hublocker.net/amazon-locker-madrid/ I only wnat to show mi description.

    Not sure I understand this one as well.

    Did you mean you only want to display the category description (if it exists) like this? https://share.getcloudapp.com/o0uPrpvb

    Is it only for a specific category? is it for ALL?

    Are you sure this is what you want to do? doing this literally makes category archive pages useless.

    Let us know.

    #1953014
    jose luis

    Hi Elvin!!

    Thanks for your reply.

    Did you mean you only want to display the category description (if it exists) like this? https://share.getcloudapp.com/o0uPrpvb

    yes that’s how i want it!

    Is it only for a specific category? is it for ALL?

    Yes for all !

    Are you sure this is what you want to do? doing this literally makes category archive pages useless.

    yes, I’m going to use shortcodes with a special layout

    #1953234
    David
    Staff
    Customer Support

    Hi there,

    you can try adding this PHP Snippet:

    add_filter( 'generate_do_template_part', function( $do ) {
        if ( is_category() ) {
            return false;
        }
        return $do;
    } );
    #1953239
    jose luis

    Hi!

    It works perfectly. Thank you very much, wonderful support

    #1953255
    David
    Staff
    Customer Support

    Awesome – glad to be of help 🙂

    #2402042
    Andrei

    Can you please explain, where and how can i add this snippet to my website?

    #2402063
    Ying
    Staff
    Customer Support

    Hi Andrei,

    You can use one of the method introduced in this article to add PHP code: https://docs.generatepress.com/article/adding-php/

    #2402070
    Andrei

    So, I can simply paste this PHP code at the end of my functions.php, right? Cause I can’t install a plugin, it shows an error when i try to activate it.

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.