Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Page & Category Menu Bars (http://forum.bytesforall.com/forumdisplay.php?f=10)
-   -   Font Size & Face setting reset on save in Page Menu Bar options (http://forum.bytesforall.com/showthread.php?t=1196)

RobertSGold Apr 9, 2009 05:05 PM

Font Size & Face setting reset on save in Page Menu Bar options
 
I am new to html, new to WP, and new to BFA, so thanks for indulgence if this is a stupid question.

When I change the Font Size & Face setting in the Page Menu Bar options to:

14px "comic sans ms", arial, sans-serif

and save it, the only thing saved is:

14 px

but the font change does take effect. But if I resave the options page again, I lose my font settings, and only get the 14px.

Any ideas?

Thanks.

paulae Apr 9, 2009 06:18 PM

You need to have the CSS styles in the proper format.

14px "comic sans ms", arial, sans-serif should be:

font-family: Comic Sans MS, arial, sans-serif;
font-size: 14px;
color: #000000;

The semi-colons are critical.

I put a color in, but I guess you can leave that out and it'll be whatever the theme's default is.

RobertSGold Apr 9, 2009 07:09 PM

Thanks for your quick reply, but I am afraid your solution didn't work. Tried several variants on using the font-family: and font-size: tags, with and without semi-colons, and had varying results that weren't successful.

Your example didn't enquote Comic Sans MS, so the font wasn't recongnized with that syntax.

P.S. I was just following the sample syntax adjacent to the entry field.

paulae Apr 9, 2009 08:46 PM

I wonder if WP doesn't like Comic Sans for some reason. Did you try some other font faces?

RobertSGold Apr 9, 2009 09:22 PM

the comic sans face actually works, and I am using it elsewhere on my site with no problem.

I think the problem is in the code for the options page.

Flynn Apr 10, 2009 07:41 PM

This is a bug, thank you for finding. To fix it in your version edit functions/bfa_theme_options.php
Replace
PHP Code:

    array(    "name" => "Font Size & Face",
            
"category" => "page-menu-bar",
            
"id" => $shortname."_page_menu_font",
            
"std" => "11px Arial, Verdana, sans-serif",
            
"type" => "text",
            
"size" => "30"
            
"info" => "Set both the font size and the font face for the menu items. Enclose font face names with a 
            space in quotes, i.e.:<br /><code>12px \"comic sans ms\", \"courier new\", arial, sans-serif</code><br />
            <br />Don't use semicolons here."
), 

with

PHP Code:

    array(    "name" => "Font Size &amp; Face",
            
"category" => "page-menu-bar",
            
"id" => $shortname."_page_menu_font",
            
"std" => "11px Arial, Verdana, sans-serif",
            
"type" => "text",
            
"size" => "30"
            
"editable" => "yes"
            
"info" => "Set both the font size and the font face for the menu items. Enclose font face names with a 
            space in quotes, i.e.:<br /><code>12px \"comic sans ms\", \"courier new\", arial, sans-serif</code><br />
            <br />Don't use semicolons here."
), 

the same for the category menu bar:
Replace
PHP Code:

    array(    "name" => "Font for Category Menu Bar",
            
"category" => "cat-menu-bar",
            
"id" => $shortname."_cat_menu_font",
            
"std" => "11px Arial, Verdana, sans-serif",
            
"type" => "text",
            
"size" => "30"
            
"info" => "Set both the font size and the font face for the menu items. Enclose font face names 
            with a space in quotes, i.e.:<br /><code>12px \"comic sans ms\", \"courier new\", arial, sans-serif</code>
            <br /><br />Don't use semicolons here."
), 

with

PHP Code:

    array(    "name" => "Font for Category Menu Bar",
            
"category" => "cat-menu-bar",
            
"id" => $shortname."_cat_menu_font",
            
"std" => "11px Arial, Verdana, sans-serif",
            
"type" => "text",
            
"size" => "30"
            
"editable" => "yes"
            
"info" => "Set both the font size and the font face for the menu items. Enclose font face names 
            with a space in quotes, i.e.:<br /><code>12px \"comic sans ms\", \"courier new\", arial, sans-serif</code>
            <br /><br />Don't use semicolons here."
), 


RobertSGold Apr 10, 2009 10:54 PM

Flynn:

Perfect.

Excellent!

Many thanks!


All times are GMT -6. The time now is 11:33 AM.

Powered by vBulletin® Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.