This topic has 9 replies, 2 voices, and was last updated 9 years by Radu.

  • Author
  • #135069
     guaser
    Participant

    Hello Superheroes,

    I hope you are all doing great!

    I have the following problem:

    I’ve created a copy of Kleo’s functions.php file into my child-theme for some modifications (removing product price sorting, changing product’s “read More” tag), and all goes well BUT!

    When I try to make changes, for example in the theme options I will get the following upon hitting the “save Changes” button:

    Warning: Cannot modify header information – headers already sent by (output started at /srv/users/serverpilot/apps/birdyh/public/wp-content/themes/kleo-child/functions.php:2) in /srv/users/serverpilot/apps/birdyh/public/wp-includes/pluggable.php on line 1174

    Also, from my own computer, I still can navigate and see everything working well (with the functions.php modifs. I made) but when accessing the site from another computer I will also the same error message.

    I am not very knowledgeable in these things. I know the PHP modifs made in the copied functions.php file are correct (well I guess) because it does successfully apply the code, I’ve removed all the “original” code from the original functions.php file in this copy and only kept the modifs which are the following:

    <?php

    // Modify the default WooCommerce orderby dropdown

    //

    // Options: menu_order, popularity, rating, date, price, price-desc

    // In this example I’m removing price & price-desc but you can remove any of the options

    function patricks_woocommerce_catalog_orderby( $orderby ) {

    unset($orderby[“price”]);

    unset($orderby[“price-desc”]);

    return $orderby;

    }

    add_filter( “woocommerce_catalog_orderby”, “patricks_woocommerce_catalog_orderby”, 20 );

     

    add_filter( ‘woocommerce_product_add_to_cart_text’, ‘woo_archive_custom_cart_button_text’ );    // 2.1 +

     

    function woo_archive_custom_cart_button_text() {

     

    return __( ‘Check It Out’, ‘woocommerce’ );

     

    }

     

    these modifications are paramount to my site, and should be simple, but I don’t know what I am doing wrong.

    Any help will be greatly appreciated, as usual 🙂

     

    Thanks a lot!

     

    #135150
     Radu
    Moderator
    Not marked as solution
    #135170
     guaser
    Participant
    Not marked as solution
    #135270
     Radu
    Moderator
    Not marked as solution
    #135294
     guaser
    Participant
    Not marked as solution
    #135304
     guaser
    Participant
    Not marked as solution
    #135307
     guaser
    Participant
    Not marked as solution
    #135454
     Radu
    Moderator
    Not marked as solution
    #135495
     guaser
    Participant
    Not marked as solution
    #135601
     Radu
    Moderator
    Not marked as solution
Viewing 10 posts - 1 through 10 (of 10 total)

The forum ‘General questions’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?