when calling a function within a class you need to use $this
prefixadd_action('wp_head',array(&$this,'load_face'));
and you will need to populate the value of $sex
public function load_face($instance) {
$sex = $instance['sex'];
wp_enqueue_style('style', WP_PLUGIN_URL . '/sample/'.$sex.'.css', null, null, 'screen');
}
Related Posts:
- How do I register a stylesheet inside a WordPress widget?
- Theme’s default styles are overriding my plugin’s custom CSS
- How to style the RSS wordpress?
- How to hide CSS by default and show on button press
- Widgets Scripts don’t load – but load when I reload the page
- Unable to locate inline CSS causing parts of page to be blank
- Content expands beyond its column container [closed]
- How can I use WordPress functions in my stylesheet?
- How to enable edit button in the theme’s customize UI?
- How can I dequeue a Plugin Stylesheet?
- Using standard backend elements in Plugin
- Using the media uploader in a custom plugin
- WordPress widget / plugin….fields not appearing in my widget
- Best way to inject css into admin_head in plugins?
- How can I retrieve data within my widget
- How can I enqueue a style only when a particular widget is active?
- How to get popular post from across a network?
- Are there plugins that interfere with the admin part of Rss widget?
- wp_enqueue_style specifics for overwriting plugin styles
- I need some direction on how to have a sidebar based on meta rather than page
- How can I reuse the WordPress search form for a custom plugin / widget?
- Is there plugin to show recent posts from one website in the widget area of another?
- Can I use a form in a dashboard widget?
- Ajax gives 400 error
- W3 Total Cache: Load CSS asynchronously for better PageSpeed score? [closed]
- Missing argument 3 for wp_register_sidebar_widget()
- Why isn’t “background-image: url”working with Bootstrap carousel on WP?
- I wrote my plugin. How to display the result of the plugin’s function to sidebar (widget?)?
- How to generate CSS from a shortcode within a plugin
- Add stylesheets and js to template files when shortcode is used
- How do I modify the position of a plugin?
- I have no idea “How change font for elements in widget?”
- How to save additional user data as part of the registration process?
- Is there an earlier hook than login_head or login_enqueue_scripts?
- Adding widgets to header and footer from plugin
- Can someone please tell me what is wrong with my plugin?
- How to remove traces from widget during uninstallation
- how to access all user dashboard on fronted page [closed]
- Which widget to use for display category post with view more? [closed]
- WordPress Widget Not Saving Data
- In the archive widget, how do I sort in between two years?
- Wysiwyg editor errors
- How to make WordPress customizable for clients
- How to get my plug-in, wrote in php, to refresh on its own every 5 minutes?
- Conditional tag in Widget Logic for checking if top level page or if subpage
- Disabling plugin but wpenqueue is not available
- Related posts widget or plugin needed
- Problem since update 3.5 [duplicate]
- How to disable a widget when dependent plugin is inactive?
- Full list of registered scripts or styles, but from an admin options page
- Widget’s container?
- Add SideBar/Widgets Just Below the Post
- Skewed / slanted button within elementor [closed]
- plugin dev – minimum base css specificity?
- PHP Warning: Declaration of aec_contributor_list::form() should be compatible with WP_Widget::form($instance)
- get specific value of a array | PHP
- Override/ignore CSS from active theme as not to interfere with my custom CSS
- Historical customisations won’t go away [closed]
- change or add css to theme from plugin
- WordPress Widget Not Saving Instance
- At a Loss on over Page Peel Plugin Customization [closed]
- Blocking Plugin Css to load custom in template directory
- jQuery slider widget similar to cnet.com
- Why aren’t my Follow Me links working?
- Theme deactived html and css styling on home page posts
- uncaught TypeError: Cannot read properties of null (reading ‘classList’) custom plugin
- How do I minify a plugins CSS/JS code?
- Creating New Dynamic Fields for a Certificate (Number Generation, Code Referencing, and more)
- How to remove Unused CSS From a WordPress Theme?
- Is there any known plugins that would replace WordPress classes in editor with their Bootstrap 4 equivalent?
- elementor development – custom widget like an inner section widget
- Applying module CSS to page
- Changing the CSS with a plugin
- how to change a static testimonials into dynamic
- Speeding up WordPress on a Local Network
- Edit the stylesheet of a child theme
- How do I override WordPress plugin css [closed]
- WP Plugin CSS not being applied to page
- Customize CSS for “Swipebox ” lightbox
- Custom content per post in widget
- Using slightly modified widget
- How to make wp multisite subdomain exist search
- Custom Widget not Available after Plugin Installation
- Best use adding user generated JS/CSS to a theme with a plugin
- Site not displaying correctly when re-directing from root to sub-directory
- WordPress audio player add class randomly using Audio Album plugin
- Best way for overwriting plugin css with custom one
- Child Theme Changes Are Not Reflecting In Parent Theme
- How to set up php,javascript and css to allow for our finished product to be displayed within a page?
- Widget redirecting to home page
- How to add different CSS for galleries
- Plugin won’t activate, fatal error (widget class not found)
- WordPress plugin not eching popular posts
- Trying to output a “Most visited blogs” list in wordpress multisite
- MultiPostThumbnails and media queries
- Eliminate Render blocking CSS?
- How to Add a Website Background Image to One Page?
- Is it possible to control content on different pages by checkboxing wich content is shown where on a wordpress theme page?
- Issue with customizer and widget page
- Footer option is missing in Customiser