Site logo

[Support request] Search results page

Home Forums Support [Support request] Search results page

Home Forums Support Search results page

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #2292641
    Lukas

    Hello
    When I want to edit the search results page, where do I edit it. I don’t like how it is displayed now. And I would like that when it finds products so that there is a button to put in the basket is it possible????

    #2292642
    Lukas
    #2292653
    Fernando
    Customer Support

    Hi Lukas,

    You can use a Block Element – Content Template: https://docs.generatepress.com/article/block-element-content-template/

    As for the button, can you give an example of it? Are you referring to “Add to Cart”?

    Kindly let us know.

    #2293446
    Lukas

    Yes I meant the add to cart button

    #2293511
    Fernando
    Customer Support

    I see. You can try adding this PHP snippet:

    function cart_shortcode($atts, $content = null) {
          ob_start();
          do_action('hook_cart’);
          return ob_get_clean();
    }
    add_shortcode('portable_cart’, ‘cart_shortcode');
    
    add_action('hook_cart’, 'woocommerce_template_loop_add_to_cart',  10);

    Then, you can use shortcode [portable_cart] in your Content Template through a shortcode Block.

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