guynirpaz 0 Report post Posted October 20, 2011 Hi, I would like to use Google Open Sans fonts in my blog. What's the safest way to do so? Thanks, Guy Share this post Link to post Share on other sites
Rob 547 Report post Posted October 20, 2011 Guy, Are you familiar with hooks? Do you have PlatformPro Base activated? If so, please open functions.php in an editor via FTP and look for this line: [code]// FILTERS EXAMPLE ---------//[/code] There's an example immediately below that for adding new fonts. In this case, the example is using Ubunto, but you can see how fast and easily you may add the fonts you wish. If you're unfamiliar with hooks, read this http://www.pagelines.com/docs/base-child-theme Former PageLines Moderator, Food Expert and Raconteur Share this post Link to post Share on other sites
guynirpaz 0 Report post Posted November 7, 2011 Thanks for the feedback. I've done all that - and Indeed I can select the right fonts - however these do not apply. When looking at it with FireBug - is see that the following css file overrides the typography seetings: http://blog.totango.com/wp-content/themes/platformpro/css/dynamic.css?ver=152-06271183112 any ideas? Share this post Link to post Share on other sites
kastelic 6 Report post Posted November 8, 2011 What font or fonts do you have set to your custom font in Pagelines Settings, ie. Primary Fonts, Secondary Fonts etc. Share this post Link to post Share on other sites
guynirpaz 0 Report post Posted November 8, 2011 I have set all of the to Google Open Sans which I've defined. Typography - Text Headers Typography - Primary Font Typography - Secondary Font Typography - Inputs and Textareas And the font name is: Open Sans * G Share this post Link to post Share on other sites
Kate 3 Report post Posted November 8, 2011 Hi Guy, Curious: are they overridden when you use another font (other than Open Sans)? Share this post Link to post Share on other sites
guynirpaz 0 Report post Posted November 9, 2011 I didn't test it acutally Share this post Link to post Share on other sites
Rob 547 Report post Posted November 9, 2011 First, you're not using PlatformBase. You must switch to the child to make that work. The guidance I gave you asked [b]"Are you familiar with hooks? Do you have PlatformPro Base activated? "[/b] You said you have it in [b]http://blog.totango.com/wp-content/themes/platformpro/css/dynamic.css?ver=152-06271183112 [/b] but the functions.php that you needed was not in platformpro, but platformbase, as indicated by my question. If you're working in the wp-content/themes/platformpro folder, it won't work. What versions of Platform do you have? Former PageLines Moderator, Food Expert and Raconteur Share this post Link to post Share on other sites
guynirpaz 0 Report post Posted November 10, 2011 Hi, I double checked and indeed PlatformPro Base is the activated theme on my blog. Base: 1.4.1 Pro: 1.5.2 For clarification: 1. I have platformbase and platformpro themes installed 2. platformbase is the activated theme 3. platformbase functions.php is the file I've changed to introduce the new google font 4. I have changed the font selection using the user interface What am I missing? Share this post Link to post Share on other sites
Danny+ 1,327 Report post Posted November 10, 2011 Hi Guynirpaz, You mention that you're using Platform Pro 1.5.2, the current version is 1.5.3, could you upgrade to the latest version and then test to see if your fonts are working or not. Please search our forums, before posting! Share this post Link to post Share on other sites
guynirpaz 0 Report post Posted November 10, 2011 Hi Danny, I have updated to the latest platform pro version and it is now 1.5.3 I also tried to setup other fonts (not just Google) but it seems the settings are not impacting the result. The current file as I see in firebug is: http://blog.totango.com/wp-content/themes/platformpro/css/dynamic.css?ver=153-111011154726 Any ideas? Share this post Link to post Share on other sites
kastelic 6 Report post Posted November 10, 2011 Does your filter look like this? [code] add_filter ( 'pagelines_foundry', 'open_sans' ); function open_sans( $thefoundry ) { $myfont = array( 'Open Sans' => array( 'name' => 'Open Sans', 'family' => '"Open Sans", sans-serif', 'web_safe' => true, 'google' => true, 'monospace' => false ) ); return array_merge( $thefoundry, $myfont ); } [/code] If this doesn't work, can you paste your entire platformbase/functions.php here please? Share this post Link to post Share on other sites
guynirpaz 0 Report post Posted November 10, 2011 require_once(STYLESHEETPATH . "/advanced.php"); // ==================================================== // = YOUR FUNCTIONS - Where you should add your code = // ==================================================== // ADDING CUSTOM SECTIONS ------- // // Register a Drag&Drop HTML Section for the admin. // A pullquote section was created here for demonstration purposes // Sections should be named: section.[your section name].php and placed in the sections folder. function base_sections(){ /* Your custom sections get registered in here... PageLines Register Section Arguments: 1. Section Class Name, 2. Directory name (or filename if in root of 'sections' folder), 3. Init Filename (if different from directory name), 4. Section setup and variable array */ pagelines_register_section('BasePullQuote', 'pullquote', null, array('child' => true) ); pagelines_register_section('BaseSidebar','sb_base', null, array('child' => true) ); } // ABOUT HOOKS --------// // Hooks are a way to easily add custom functions and content to the Platform theme. There are hooks placed strategically throughout the theme // so that you insert code and content with ease. // HOOKS EXAMPLE --------// // Below is an example of how you would add a social media icon to the icons in header (branding section) // We have placed a hook at the end of the icon set specifically add new icons without modifying code or having to worry about your edits // getting thrown out during the upgrade process. The way to use hooks goes a little like this: // add_action('hook_name','function name'); // ---> uncomment to load //add_action('pagelines_branding_icons_end', 'add_icons_to_branding'); // function name function add_icons_to_branding(){ // This hook adds a stumbleupon icon to the header of your theme. The class referenced in the link can be seen in the style.css // and is the image from the CSS is placed in the images folder ?> array( 'name' => 'Open Sans', 'family' => '"Open Sans", sans-serif', 'web_safe' => true, 'google' => true, 'monospace' => false ) ); return array_merge( $thefoundry, $myfont ); } // ADDING NEW TEMPLATES --------// // Want another page template for drag and drop? Easy :) // 1. Add File called page.[page-id].php to Base // 2. Add /* Template Name: Your Page Name */ and Call to 'setup_pagelines_template();' to that file (see page.base.php) // 3. Add 'pagelines_add_page('[page-id]', '[Page Name]');' to this functions.php file // Add Base Page if ( function_exists( 'pagelines_add_page' ) ) pagelines_add_page('base', 'Custom Page'); // OVERRIDE SECTION TEMPLATES --------// // Want more customization control over any of the core section templates in PlatformPro? Just override the template file. // To do that, just add a file called template.[section-id].php to this child theme and it will override the section templates // for the section with that ID. For example, template.boxes.php will override the boxes templates. // Once overridden you can copy the code from that section, paste it there and edit to your heart's content. Share this post Link to post Share on other sites
kastelic 6 Report post Posted November 10, 2011 Well , that is absolutely correct. It should be working. It doesn't affect dynamic.css what it does is add a call to the google font and a style tag applying the font to your head directly after the call to dynamic.css. Which I am not seeing on your site. Could it possible be a plugin conflict of some sort? Do you have a caching plugin enabled, and if so disable it and refresh. Share this post Link to post Share on other sites
guynirpaz 0 Report post Posted November 11, 2011 No caching at all. The problem seems that even if I change to other fonts - there is no change in the web site. It seems that the dynanmic.css always returns the same css values for font-family even if those are change on the typography settings. Share this post Link to post Share on other sites
catrina 103 Report post Posted November 11, 2011 Try deactivating any other plugins you have (even if they're not caching plugins). Please read the docs before posting. Please do not private message me unless I ask you to. Designer | Catrina Dulay Founder | Catrina and Mouse Share this post Link to post Share on other sites
guynirpaz 0 Report post Posted November 11, 2011 Is there a technical documentation which explains how dynamic css work? Share this post Link to post Share on other sites
catrina 103 Report post Posted November 11, 2011 There isn't PageLines documentation about how it works, but there is this article on it: http://nubyonrails.com/articles/dynamic-css Please read the docs before posting. Please do not private message me unless I ask you to. Designer | Catrina Dulay Founder | Catrina and Mouse Share this post Link to post Share on other sites
guynirpaz 0 Report post Posted November 14, 2011 I ended up changing the fonts directly on the platform pro dynamic css file. This is not a good solution obviously, it's not dynamic nor configurable. Share this post Link to post Share on other sites
Simon 248 Report post Posted November 14, 2011 under misc-settings, select 'inline-css' Share this post Link to post Share on other sites
Danny+ 1,327 Report post Posted November 14, 2011 Edit** Do what Pross suggested. Please search our forums, before posting! Share this post Link to post Share on other sites