Title: Unable to use the PHP function
Last modified: August 22, 2016

---

# Unable to use the PHP function

 *  [NemoViz](https://wordpress.org/support/users/nemoviz/)
 * (@nemoviz)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/unable-to-use-the-php-function/)
 * Hi!
    This is a plugin I was looking for since I started on WordPress. Excellent
   job! However, considering I’m the totally newbie to all this stuff I’m helpless
   in adding it as an PHP function to the header of my site. I’m using ‘TwentyFourteen’
   and I’d really appreciated some detailed instruction how to add the required 
   lines in the ‘header.php’ file, I’m really a blonde for that matter xD. Thank
   you in advance! P.S. As a feature suggestion it would be great to have a font
   size changer next to the existing functions. It’s doable through a CSS file but
   you could end up with 25 different choices (5 color styles x 5 font sizes). Separate
   function would be really nice. Take care and keep up the good work. If it helps,
   the site URL I’m testing this is: [http://vijesti.nemoviz.org](http://vijesti.nemoviz.org)(
   it’s a subdomain on my public site) but as I said, it’s plain and simple ‘TwentyFourteen’
   theme.
 * [https://wordpress.org/plugins/wp-user-stylesheet-switcher/](https://wordpress.org/plugins/wp-user-stylesheet-switcher/)

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Author [vgstef](https://wordpress.org/support/users/vgstef/)
 * (@vgstef)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/unable-to-use-the-php-function/#post-5199566)
 * Have you tried the example in the installation page?
 *     ```
       <?php global $wpUserStylesheetSwitcher;
       $wpUserStylesheetSwitcher->show_wp_user_stylesheet_switcher(array('list_title'=>'Available styles', 'show_list_title'=>'true', 'list_type'=>'dropdown'));?>
       ```
   
 * You put that in the header.php file. For example inside the `<div class="header-
   main">`
 * But I guess you’d better first try it with the widget or the shortcode to be 
   sure that it works and that you get what you want.
 * Concerning the font size change. It’s interesting, but it’s getting a bit out
   of the scope of my plugin. Look in the registry, there might already be other
   plugins for that.
 *  Thread Starter [NemoViz](https://wordpress.org/support/users/nemoviz/)
 * (@nemoviz)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/unable-to-use-the-php-function/#post-5199617)
 * Hi!
    Thanks for your help, now it works as you can see at [http://vijesti.nemoviz.org](http://vijesti.nemoviz.org)
 * Do you happen to know what should I change in the strings you sent to put it 
   on the right side of the header? Now it is bellow the logo and I’d rather put
   it on the right side, just above the first menus.
    It’s working as a dropdown
   and I suppose I need to create some icons to be able to work as graphical presentation..
   I’ll try this in some time, first I have to prepare the style sheets. Regarding
   font size switcher I tested bunch of plugins and the only one which is somehow
   working right is out of development for about a year and it’s not so stable. 
   Font size resets on a page refresh and links opening so every time I open a post
   or page or anything I need to set the size again. I wrote the author but still
   waiting for the reply and frankly, I don’t expect too much from her. In the first
   post, when I suggested this my point was that color switching and font size changes
   go hand in hand in the accessibility standards for partially sighted users. Visually
   impaired folks often want to adjust the background and font size on their screens
   and those two things is related, at least from the users point of view so, from
   the web developers point it would be nice to have such a plugin with both functionalities.
   Perhaps you could give it some thought, it would be really great. Thanks again
   for your help and take care!
 *  Plugin Author [vgstef](https://wordpress.org/support/users/vgstef/)
 * (@vgstef)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/unable-to-use-the-php-function/#post-5199636)
 * If you want to place the stylesheet switcher elsewhere, you can try to place 
   the code somewhere else in the div. Maybe after the nav ones. But you will probably
   have to change some CSS (ie. float right).
 * About the font size, changing the size can lead to a lot of design and layout
   issue. I don’t want to get into that. This plugin give the possibility to developpers
   to offer as many stylesheets as they want. If wants bigger font, they also can
   just zoom in with their browser (for example Ctrl+wheel mouse).
 * Plugin developpement is time consuming. If I’d be paid or get donations, I could
   consider adding functionnalities or making other plugins. But for now, my plugin
   works well, so I’ll work on other projects.
 *  Thread Starter [NemoViz](https://wordpress.org/support/users/nemoviz/)
 * (@nemoviz)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/unable-to-use-the-php-function/#post-5199638)
 * Yeah, I agree with you on the time consuming/get paid part, I know exactly how
   you feel. I’ll try to donate in upcoming weeks as I’m also in the self publishing
   and I could use some finances aswell.
    One more thing before I conclude on this
   topic. From what I understood from the plugin Settings and readme file I am able
   to put the style switcher as widget, as shortcode and as a PHP function. If I’m
   not mistaking, I believe you wrote in instructions that different styles can 
   be used on different places, for example I can put styles 1, 2 and 3 on a widget,
   styles 4, 5 and 6 on a shortcode. What I would like to know is how could I assign
   different style sets to several header buttons? Let’s say I have 5 buttons on
   the header and I’d like to assign styles 1,2 and 3 on the first one, 4, 5 and
   6 on the second etc. I believe I could use that setup for changing the font size
   because I could put font size 100% at the first button and toggle all the color
   schemes on it. Next button would be font size 120% with the same toggling options
   for colors and so on untill 200% on the fifth button. I didn’t quite get how 
   to assign different style sets for different ways of implementing the plugin 
   so if it’s not a problem for you could you explain a bit? Thanks and take care!
 *  Plugin Author [vgstef](https://wordpress.org/support/users/vgstef/)
 * (@vgstef)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/unable-to-use-the-php-function/#post-5199689)
 * Hi NemoViz,
 * The plugin allows many instance of the stylesheet choice on the same page, with
   different layout, but they all offer the same CSS stylesheets.
 * I was think about you desire to have different font size for different stylesheets.
   But the point of this plugin is that : offer the possibility to have different
   design for a website. Each stylesheet can have different colors, font size, etc.
 * You’re rigth that having 5 or 10 different stylesheets would make it hard to 
   manage. But do you really needs that many stylesheets or options? Browser and
   intelligent phone already offer the zoom option.
 * Though, I keep in mind the possibility of having different options for each switcher,
   but I don’t know if and when I could implement that.
 *  Thread Starter [NemoViz](https://wordpress.org/support/users/nemoviz/)
 * (@nemoviz)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/unable-to-use-the-php-function/#post-5199691)
 * Hi!
    The difference between having switchable font sizes on a page and zoom options
   is significant. When you have font size options in a page layout when you enlarge
   the font size you have everything visible within screen borders. Text automatically
   wraps and aligns but it is visible on the screen, nothing gets out of its borders
   and you don’t have to use scrollbar to follow it which exactly happens when you
   use large zoom modes in browser. After a few levels the text starts to expand
   beyond the left and right borders and the only solution is scrollbar which is
   not such a good solution for extensive use. Regarding your question, I need atleast
   8 different styles: original, black on white, white on black, black on yellow,
   yellow on black, white on blue, blue on white, yellow on blue and blue on yellow.
   Those are usual settings for magnification hardware which are used by partially
   sighted. I know that job i s gonna put me in the nuthouse because I need to modify
   2014 CSS eight times in the roll and that’s just a tiny 4k lines but it has to
   be done xD. I’ll stick to the zoom functions till I find something useful and
   I hope you’ll continue the work on this plugin. It is useful in many ways besides
   site presentation and please keep it going. Thanks and take care!
 *  Plugin Author [vgstef](https://wordpress.org/support/users/vgstef/)
 * (@vgstef)
 * [11 years ago](https://wordpress.org/support/topic/unable-to-use-the-php-function/#post-5199791)
 * Hi NemoViz,
    Have you looked at my new update? I made big changes to this version.
   One on them is the possibility to have multiple switchers. So you could configure
   different “menu” like one for the font, one for the text size, one for color 
   scheme, etc. Hope this helps.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Unable to use the PHP function’ is closed to new replies.

 * ![](https://ps.w.org/wp-user-stylesheet-switcher/assets/icon.svg?rev=982756)
 * [WP User Stylesheet Switcher](https://wordpress.org/plugins/wp-user-stylesheet-switcher/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-user-stylesheet-switcher/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-user-stylesheet-switcher/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-user-stylesheet-switcher/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-user-stylesheet-switcher/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-user-stylesheet-switcher/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [vgstef](https://wordpress.org/support/users/vgstef/)
 * Last activity: [11 years ago](https://wordpress.org/support/topic/unable-to-use-the-php-function/#post-5199791)
 * Status: not resolved