Forum Replies Created

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter Tamara

    (@heyitstamara8)

    @poguet, @felipeowen – glad this is still helping people!

    • This reply was modified 9 years, 6 months ago by Tamara.
    Thread Starter Tamara

    (@heyitstamara8)

    Thanks so much Evan!

    Thread Starter Tamara

    (@heyitstamara8)

    Ha! — 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-7476423

    Similar 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.

    Thread Starter Tamara

    (@heyitstamara8)

    So 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' />
    Thread Starter Tamara

    (@heyitstamara8)

    Update, 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.php

    2) 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!

    Thread Starter Tamara

    (@heyitstamara8)

    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?

    Thread Starter Tamara

    (@heyitstamara8)

    I 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.

    Thread Starter Tamara

    (@heyitstamara8)

    I 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 -->
    Thread Starter Tamara

    (@heyitstamara8)

    Do I need to encorporate something like this??

    is_front_page() && is_home() // Default homepage

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