Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #821996
    FCEadmin
    Participant

    Hey X Theme,

    I’m having a problem with auto p tags with X in my woocommerce store. I’ve used the code below in my functions.php before, and it works for the entire site. However, I just installed woocommerce, and on the woocommerce pages, hitting the return key auto creates p tags.

    remove_filter( 'the_content', 'wpautop' );
    remove_filter( 'the_excerpt', 'wpautop' );

    Could you please help me with this?
    Thanks in advance!

    URL: http://fce.staging.wpengine.com/shop/
    Wordpress Version: 4.4.2
    X Version: 4.0.6

    #822306
    Darshana
    Moderator

    Hi there,

    Thanks for writing in! Could you please try updating to WooCommerce v2.5.0 from the following link (https://wordpress.org/plugins/woocommerce/developers/).

    Please make sure to take a full backup before updating.

    Let us know how it goes.
    Thanks!

    #823604
    FCEadmin
    Participant

    Just updated wooCommerce and replaced all the out of date themes. However, it did not fix the wpautop problem 🙁

    #823926
    Jade
    Moderator

    Hi Katherine,

    Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:

    – Link to your site
    – WordPress Admin username / password
    – FTP credentials

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    #824022
    FCEadmin
    Participant
    This reply has been marked as private.
    #824427
    Rue Nel
    Moderator

    Hello There,

    Thanks for providing the very detailed information.

    Since you already have your child theme active and ready, please insert this following code in your child theme’s functions.php file.

    // Remove wpautop in product pages
    // =============================================================================
    function remove_autop_for_product( $content ){
        // check for product post type
        'product' === get_post_type() && remove_filter( 'the_content', 'wpautop' );
        return $content;
    }
    add_filter( 'the_content', 'remove_autop_for_product', 0 );
    // =============================================================================

    X 4.3.4 and Cornerstone 1.1.3 are now available! This release contains several bug fixes and we’re quite excited about the new features, so be sure to check out the changelog. Please do update to the latest version. After doing the updates, always remember to clear all caches when updating so that the code from the latest release is always in use. This will help you to avoid any potential errors.

    Please let us know how it goes.

    #827002
    FCEadmin
    Participant

    I copied that into my functions.php, but it didn’t work 🙁

    Is the update necessary for it to work? I tried updating, but the styling got messed up, and i restored it back to what I had previously.

    #827978
    Friech
    Moderator

    Hi There,

    Yes, the code is tested on the latest version of the X|Theme. Please update your x|theme and cornerstone to the latest version. And follow the solution provided here: https://community.theme.co/forums/topic/update-messed-up-site-2/#post-780902 if the styling got messed up.

    Also clear your browser’s cache and any caching plugins that the site might have, before previewing the site.

    Hope it helps, Cheers!

    #828677
    FCEadmin
    Participant

    Hello,

    I’ve updated to the newest version of X, and newest version of child themes available in the knowledge base. However, the styling is still messed up (primarily in the navigation and the h1 tags not taking my h1 styles. See screenshots for before and after). I’ve also added the snippet of code that you gave me above into my functions.php file in my child theme, but it still doesn’t work on the woocommerce pages.

    Thanks in advance for all your help!

    #828680
    FCEadmin
    Participant

    Oops, the files I originally uploaded exceeded the allowed file size. I’ve reattached them here.

    #829353
    Friech
    Moderator

    Hi There,

    You can fix the menu issue on Customizer under Header tab and look for the Navbar Letter Spacing option. For the headlines in it under Typography tab and the option Letter Spacings.

    Hope it helps, Cheers!

    #830316
    FCEadmin
    Participant

    Thanks. I’m not sure why but I didn’t change anything and the nav automatically fixed itself today, so thats good news!

    However, the original problem from this thread still hasn’t been solved 🙁 The wpautop isn’t disabled on wooCommerce pages.
    I have added the code below to my functions.php file on my child theme:

    // Remove wpautop in product pages
    // =============================================================================
    function remove_autop_for_product( $content ){
        // check for product post type
        'product' === get_post_type() && remove_filter( 'the_content', 'wpautop' );
        return $content;
    }
    add_filter( 'the_content', 'remove_autop_for_product', 0 );
    // =============================================================================

    But it didn’t fix it.

    #830868
    Rad
    Moderator

    Hi there,

    How about this one,

    // Remove wpautop in product pages
    // =============================================================================
    function remove_autop_for_product( $content ){
        // check for product post type
        'product' === get_post_type() && remove_filter( 'the_content', 'wpautop' );
        return $content;
    }
    add_action( 'init', 'remove_autop_for_product', 999999 );
    // =============================================================================
    

    Please try and let me know.

    Thanks!

    #830911
    FCEadmin
    Participant

    Nope, that didn’t work either :'(

    #831376
    Rad
    Moderator

    Hi there,

    Would you mind installing this plugin https://wordpress.org/plugins/toggle-wpautop/?

    Hmm, maybe there is a confusion. Is it the shop page that has the auto-p issue? Or the product pages? That’s because I can see your line breaks issue within the shop upper content, you could be referring to shop page content and not the product page content. If yes, then the next question is, how did you add that upper content? The solution will depend on how you added that custom content.

    I can check it through FTP, but it’s not working.

    Thanks!

  • <script> jQuery(function($){ $("#no-reply-821996 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>