Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM › Dequeueing Styles from registration page/shortcode
Tagged: Customization, dequeue, styles, yootheme
- This topic has 3 replies, 3 voices, and was last updated 4 years, 8 months ago by Sayan Naskar.
- AuthorPosts
- April 6, 2020 at 6:12 pm #115943jkParticipant
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!
- April 12, 2020 at 12:21 pm #118318WCFM ForumMember
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
- April 14, 2020 at 11:14 am #118948jkParticipantThis reply has been marked as private.
- April 14, 2020 at 12:40 pm #118974Sayan NaskarMember
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.
- AuthorPosts
- You must be logged in to reply to this topic.