Problem with creating child theme

Mauer Themes Support Bild Problem with creating child theme

This topic contains 10 replies, has 2 voices, and was last updated by  B4s 1 year, 6 months ago.

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #1110

    B4s
    Participant

    Hi! I recently bought your theme and im creating my website locally using XAMP. Before making small changes to the theme I’m trying to create a child theme. But somehow the child theme doesn’t load correctly. The photos in the gallery don’t fill up the entire lay out, they appear small in the top left corner. And the menu isn’t underlined once but twice, red and grey line.

    A screenshot from the first problem:

    http://baskoolstra.nl/a/screenshot.png

    I suspect I’m doing something wrong in the child’s function.php; the code:

    <?php
    function my_theme_enqueue_styles() {
    
        $parent_style = 'mauer-theme-stylesheet';
    
        wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
        wp_enqueue_style( 'child-style',
            get_stylesheet_directory_uri() . '/style.css',
            array( $parent_style ),
            wp_get_theme()->get('Version')
        );
    }
    add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
    ?>

    I hope I could help with this problem 🙂

    • This topic was modified 1 year, 7 months ago by  B4s.
    #1114

    Paul
    Keymaster

    Hello B4s,

    Please use the following code instead of the solution you mentioned above and let me know if it works for you:

    if (!function_exists('bild_child_enqueue_scripts_and_styles')) :
    
    	function bild_child_enqueue_scripts_and_styles() {
    
    		# Styles
    		wp_enqueue_style('child-theme-stylesheet', get_stylesheet_directory_uri() . '/style.css');
    
    	}
    
    endif;
    
    add_action('wp_enqueue_scripts', 'bild_child_enqueue_scripts_and_styles');

    Kind regards,
    Paul

    #1119

    B4s
    Participant

    Hello Paul,

    That works, thank you for the good support.

    Bas

    #1120

    Paul
    Keymaster

    Bas, you’re very welcome. Thank you for having chosen Bild for your project.

    If you enjoy the theme (or the support), I would be really grateful if you could rate it on ThemeForest. This literally takes a moment and helps a lot. Thank you.

    Paul

    #1198

    B4s
    Participant

    I chose to rate it after I put my website live. It’s live now and gave you a 5 star rating, very great theme! If you care to see the finished website: http://www.baskoolstra.nl

    #1218

    Paul
    Keymaster

    Thank you, Bas!

    I find your style of photography very appealing and natural — without the glossiness that’s often associated with wedding photos. I’m glad you chose Bild for your content.

    Kind Regards,
    Paul

    #1219

    Paul
    Keymaster

    P.S.:

    Maybe it makes sense to make the ‘menu’ link you’ve added a bit smaller : )

    #1220

    Paul
    Keymaster

    P.P.S.:

    I think your logo would better fit the visual style of the website if you make it’s color #222 — just as the text in the theme.

    Also, to not have it blurry, you could make the file 326px before uploading it, and make sure to play with antialiasing when you prepare the file.

    #1224

    B4s
    Participant

    Thank you for your compliment Paul! Also thanks a lot for your advise, I made the menu text smaller and replaced the logo, it does look much better now, awesome!

    #1225

    Paul
    Keymaster

    Great to be of help, Bas.

    Best,
    Paul

    #1231

    B4s
    Participant

    By the way, I see a few people asking about a back button from a gallery to the gallery archives page. I’m also missing that feature. An elegant way might be a button in the top left corner of the slider container, similar in appearance to the fullscreen button in the top right corner.

    How much would you charge to add that code?

Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.