Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Theme Stylesheet-For-Calling-in-Head
- <!-- call this in before head -->
- <?php global $data; ?>
- <?php if($data['ams_site_title']): ?>
- <link rel="stylesheet" type="text/css" href="<?php echo get_template_directory_uri(); ?>/css/<?php echo do_shortcode(stripslashes($data['ams_site_title']));?>.css" media="all" />
- <?php endif; ?>
- <!-- call this into admin->functions->functions.option.php -->
- // Theme Stylesheet Option
- $of_options[] = array( "name" => "Theme Stylesheet",
- "type" => "heading"
- );
- $of_options[] = array( "name" => "Theme Stylesheet",
- "desc" => "Select your themes alternative color scheme.",
- "id" => "ams_site_title",
- "std" => "default.css",
- "type" => "select",
- "options" => array(
- 'light' => 'light css',
- 'dark' => 'dark css',
- 'red' => 'red css',
- 'theme_stylesheet.css' => 'theme_stylesheet',
- )
- );
- <!-- call this into your functions.php -->
- function sd_css_style() {
- /* ------------------------------------------------------------------------ */
- /* Register Stylesheets */
- /* ------------------------------------------------------------------------ */
- wp_register_style('theme_stylesheet', get_template_directory_uri() . '/css/theme_stylesheet.css', 'style');
- /* ------------------------------------------------------------------------ */
- /* Enqueue Styles */
- /* ------------------------------------------------------------------------ */
- wp_enqueue_style( 'theme_stylesheet');
- }
- add_action( 'wp_enqueue_scripts', 'sd_css_style', 1 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement