wcfm-santa

We're celebrating Durga Puja! Grab Upto 30% OFF on all WCFM Addons.

Claim Offer
01Day 07Hr 42Min 22Sec
wcfm-santa

Dequeueing Styles from registration page/shortcode

We're shifting our Forum based support to a more dedicated support system!

We'll be closing our Forum support from 10th June, 2020 and move to Email Support assistance.

  • If you are a WCFM premium add-ons user, contact us- here
  • Want to know more before buying our add-ons? Send Pre sale queries- here
  • If you are a WCFM free user, please open a support ticket at WordPress.org
  • For WCFM App related queries, reach us- here
From now the forum will be read-only!

Multi Vendor Marketplace Plugin | WCFM Marketplace Forums WCFM Dequeueing Styles from registration page/shortcode

Viewing 3 reply threads
  • Author
    Posts
    • #115943
      jk
      Participant

      Hello there,

      I’ve been trying to get rid of the standard styles from the registration forms to enforce the yootheme styles that’s being used on the site.

      
      add_action( 'after_wcfm_load_styles', 'wcfm_dequeue_style', 300 );
      
      function wcfm_dequeue_style() {
        wp_dequeue_style( 'wcfm_membership_registration_css' );
        // wp_dequeue_style( 'wcfm_enquiry_button_css' );
        // wp_dequeue_style( 'wcfm_subscribe_button_css' );
        // wp_dequeue_style( 'wcfm_qtip_css' );
      }
      
      function discover_scripts() 
      {
        if($_GET['show']) {
          echo '<pre>';
          // Registered styles
          var_dump(wp_styles()->registered);
      
          // Queued styles
          var_dump(wp_styles()->queue);
      
          // Registered scripts
          var_dump(wp_scripts()->registered);
      
          // Queued scripts
          var_dump(wp_scripts()->queue);
          echo '</pre>';
        }
      }
      add_action( 'wp_enqueue_scripts', 'discover_scripts', 100 );
      

      This is what I used to find out which styles were enqueued and which one I need to remove, which seems to be “wcfm_membership_registration_css”.

      This PHP is getting processed (child theme of yootheme, functions.php), but I see no difference in the output of the page.
      Could you help me out?

      Thank you lots in advance!

    • #118318
      WCFM Forum
      Keymaster

      Hi,

      I am not very sure, why you want to dequeue these CSS/JS files!

      If you dequeue those then that page will be totally broken.

      If you want to add your own style then add your custom CSS under child theme’s style.css

      Thank You

    • #118948
      jk
      Participant
      This reply has been marked as private.
    • #118974
      Sayan Naskar
      Keymaster

      Hello,
      The HTML structure of WCFM registration form and the theme is completely different. In the WCFM registration form the CSS class used by the theme for styling the theme is obviously not present so if you remove the WCFM Stylesheet the page will completely break as mentioned above. So it is better to overwrite the WCFM styles to match the theme style from the child themes functions.php or themes custom css section.

      If you take a look at https://vondersee.digital/marketplace/registrierung/, you can see that we already have styles for all kinds of elements – also for buttons – but they’re not working
      >>>This will not work as the theme uses class styling to style the elements and those classes are obviously not present in WCFM form.

Viewing 3 reply threads
  • You must be logged in to reply to this topic.