• Skip to primary navigation
  • Skip to main content

RocketGeek

Home of WP-Members, The Original WordPress Membership Plugin

  • WordPress Plugins
    • WP-Members
      • FAQs
      • Quick Start
      • Documentation
      • Extensions
    • Advanced Options
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Download Protect
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Invite Codes
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • MailChimp Integration
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • PayPal Subscriptions
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Salesforce Web-to-Lead
    • Security
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Text Editor
      • Purchase the Plugin
      • Get the Pro Bundle
    • User List
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • User Tracking
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Memberships for WooCommerce
    • WordPass
  • Blog
    • Basics
    • Tips and Tricks
    • Filters
    • Actions
    • Code Snippets
    • Shortcodes
    • Design
    • Release Announcements
  • Store
    • Cart
    • Checkout
  • Contact
  • Log In
  • Show Search
Hide Search
Home » Plugins » WP-Members » Documentation » Filter Hooks » wpmem_admin_style_list

wpmem_admin_style_list

Description

This filter hook allows you to add to the list of stylesheets in the dropdown list found in the plugin’s options tab.  This allows developers and admins to add additional stylesheets a site owner can choose from beyond what is included in the plugin download.  Note: you will want to store any additional stylesheets outside of the plugin’s /wp-members/ folder structure so it will not be overwritten when you upgrade the plugin.

 

Usage

add_filter( 'wpmem_admin_style_list', 'my_styles' );

function my_styles( $list )  {

	/*
	 * Create an array for the stylesheets you want to add.
	 * The key is what will show in the dropdown, the value
	 * is the path/url to the stylesheet.
	 */
	$new_style = array( 
		'My Stylesheet' => '/wp-content/some-directory/some-sheet.css',
		'Some Style' => '/wp-content/some-directory/other-sheet.css',
	);
	
	/*
	 * Use array_merge to merge the new styles array $new_style
	 * into the dropdown array $list.
 	 */
	$new_list = array_merge( $list, $new_style );
	
	/*
	 * Return your new list array
 	 */
	return $new_list; 
}

Code Snippet Library [Subscriber Content]

  • Working with Genesis: Stylesheet Pack
See a list of all filter and action hooks

Ready to get started?

Join Today!

© 2025 · butlerblog.com · RocketGeek is built using WordPress, WP-Members, and the Genesis Framework

  • butlerblog.com
  • WP-Members Support Subscription
  • Terms of Service
  • Privacy Policy
  • Refund Policy