-
AuthorPosts
-
March 3, 2016 at 9:07 am #821996
FCEadminParticipantHey 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.6March 3, 2016 at 12:31 pm #822306
DarshanaModeratorHi 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!March 4, 2016 at 8:22 am #823604
FCEadminParticipantJust updated wooCommerce and replaced all the out of date themes. However, it did not fix the wpautop problem 🙁
March 4, 2016 at 1:14 pm #823926
JadeModeratorHi 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 credentialsDon’t forget to select Set as private reply. This ensures your information is only visible to our staff.
March 4, 2016 at 2:34 pm #824022
FCEadminParticipantThis reply has been marked as private.March 4, 2016 at 11:46 pm #824427
Rue NelModeratorHello 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.
March 7, 2016 at 9:03 am #827002
FCEadminParticipantI 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.
March 7, 2016 at 10:34 pm #827978
FriechModeratorHi 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!
March 8, 2016 at 8:33 am #828677
FCEadminParticipantHello,
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!
March 8, 2016 at 8:35 am #828680
FCEadminParticipantOops, the files I originally uploaded exceeded the allowed file size. I’ve reattached them here.
March 8, 2016 at 4:15 pm #829353
FriechModeratorHi 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!
March 9, 2016 at 8:21 am #830316
FCEadminParticipantThanks. 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.
March 9, 2016 at 2:27 pm #830868
RadModeratorHi 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!
March 9, 2016 at 2:46 pm #830911
FCEadminParticipantNope, that didn’t work either :'(
March 9, 2016 at 9:05 pm #831376
RadModeratorHi 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!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-821996 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
