Tamara
Forum Replies Created
-
Forum: Themes and Templates
In reply to: enqueuing many stylesheets into child theme in correct order@poguet, @felipeowen – glad this is still helping people!
- This reply was modified 9 years, 6 months ago by Tamara.
Forum: Plugins
In reply to: [Timeline Express] Removing Link to Announcement from IconThanks so much Evan!
Forum: Themes and Templates
In reply to: enqueuing many stylesheets into child theme in correct orderHa! — I figured it out π
this is what I ended up putting into my functions.php file in the end (after MUCH trial and error and HOURS of google searching):
<?php add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles', 99 ); function theme_enqueue_styles() { wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); }that number “99” is what did the trick.
I found the answer here:
https://wordpress.org/support/topic/zerif-lite-child-theme?replies=23#post-7476423Similar to that post — I needed the parent and child theme css to load AFTER the bootstrap CSS, which is loaded in the StanleyWP parent theme.
You can fix this by adding a low priority to your functions.php – that is the ’99’.
I wish this was better described in the codex and elsewhere.
Forum: Themes and Templates
In reply to: enqueuing many stylesheets into child theme in correct orderSo I saw that Brad Williams (the StanleyWP theme developer) commented on this thread:
http://helpwp.com/question/how-to-crate-a-child-theme-for-stanleywp/
and suggested this fix for the functions:
<?php add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' ); function theme_enqueue_styles() { wp_enqueue_style( 'bootstrap-style', get_template_directory_uri() . '/css/bootstrap.css' ); wp_enqueue_style( 'bootstrap.min.-style', get_template_directory_uri() . '/css/bootstrap.min.css' ); wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); }I tried it, but still no luck. No change, still black in the header, fonts off, etc. And when I looked at the source code, bootstrap was loaded twice (before and after the parent styles).
<link rel='stylesheet' id='open-sans-css' href='https://fonts.googleapis.com/css?family=Open+Sans%3A300italic%2C400italic%2C600italic%2C300%2C400%2C600&subset=latin%2Clatin-ext&ver=4.4' type='text/css' media='all' /> <link rel='stylesheet' id='dashicons-css' href='http://tamararing.com/wp-includes/css/dashicons.min.css?ver=4.4' type='text/css' media='all' /> <link rel='stylesheet' id='admin-bar-css' href='http://tamararing.com/wp-includes/css/admin-bar.min.css?ver=4.4' type='text/css' media='all' /> <link rel='stylesheet' id='bootstrap-style-css' href='http://tamararing.com/wp-content/themes/stanleywp/css/bootstrap.css?ver=4.4' type='text/css' media='all' /> <link rel='stylesheet' id='bootstrap.min.-style-css' href='http://tamararing.com/wp-content/themes/stanleywp/css/bootstrap.min.css?ver=4.4' type='text/css' media='all' /> <link rel='stylesheet' id='parent-style-css' href='http://tamararing.com/wp-content/themes/stanleywp/style.css?ver=4.4' type='text/css' media='all' /> <link rel='stylesheet' id='bootstrap-css' href='http://tamararing.com/wp-content/themes/stanleywp/css/bootstrap.min.css?ver=3.0.3' type='text/css' media='all' /> <link rel='stylesheet' id='wpbase-css' href='http://tamararing.com/wp-content/themes/stanleywp/css/wpbase.min.css?ver=3.0.3' type='text/css' media='all' /> <link rel='stylesheet' id='font-awesome-css' href='http://tamararing.com/wp-content/themes/stanleywp/css/font-awesome.min.css?ver=4.0.3' type='text/css' media='all' /> <link rel='stylesheet' id='magnific-css' href='http://tamararing.com/wp-content/themes/stanleywp/css/magnific.css?ver=0.9.4' type='text/css' media='all' /> <link rel='stylesheet' id='theme-style-css' href='http://tamararing.com/wp-content/themes/stanleywp-child/style.css?ver=3.0.3' type='text/css' media='all' /> <link rel='stylesheet' id='simple-social-icons-font-css' href='http://tamararing.com/wp-content/plugins/simple-social-icons/css/style.css?ver=1.0.12' type='text/css' media='all' /> <link rel='stylesheet' id='googleFonts-css' href='http://fonts.googleapis.com/css?family=Montserrat%3A400%2C700&ver=4.4' type='text/css' media='all' />Forum: Fixing WordPress
In reply to: Multiple sidebars – showing up in widget area but not on live siteUpdate, I fixed this myself, but realized I did indeed need to take your advice – alchymyth, so thank you!!
1) I renamed sidebar-2.php
—> It is now named sidebar-home.php2) I changed my multi-sidebar code in all of my template files to be like so:
<!-- MULTI SIDEBARS --> <?php if ( is_front_page() && is_home() ) { // Default homepage get_sidebar( 'home' ); } elseif ( is_front_page() ) { // static homepage get_sidebar( 'home' ); } elseif ( is_home() ) { // blog page get_sidebar( 'home' ); } else { //everything else get_sidebar(); } ?> <!-- END MULTI SIDEBARS -->Then all of a sudden my homepage / frontpage sidebar started showing up on the homepage π
So it was definitely renaming my sidebar file to match with what I was putting in the template files. Thank you again!
Forum: Themes and Templates
In reply to: Trying to emulate Wired's linking style . . .Well now I feel silly (I think I just answered my own question) . . . couldn’t I just remove the class, and apply it to the actual a tag?
Then I wouldn’t have to worry about the class? . . . And it would apply universally?
Forum: Fixing WordPress
In reply to: Multiple sidebars – showing up in widget area but not on live siteI am forgoing this idea doing regular single sidebars on every page.
Then I am going to try and create another template file just for the homepage, where I can call that sidebar.
Forum: Fixing WordPress
In reply to: Multiple sidebars – showing up in widget area but not on live siteI have a sidebar-2.php file:
<?php /** * The sidebar containing the front page widget area. * * @package Creative & Curly - v5b */ if ( ! is_active_sidebar( 'sidebar-2' ) ) { return; } ?> <div id="secondary" class="widget-area" role="complementary"> <?php dynamic_sidebar( 'sidebar-2' ); ?> </div><!-- #secondary -->Forum: Fixing WordPress
In reply to: Multiple sidebars – showing up in widget area but not on live siteDo I need to encorporate something like this??
is_front_page() && is_home() // Default homepage