• Arial73

    (@arial73)


    Hi there,
    I maintain a website using WordPress *gasp* and I was asked to make a splash page for the site. I use the twentyeleven theme and I would like to create a custom page template for my splash page.
    I created a child theme in my themes folder and also copied my existing page template and renamed it for my custom page template.

    Here’s the rub: my child theme strips all the formatting from my home page, despite using a functions.php to enqueue the parent stylesheet.
    The closest example is this link, specifically the image with the pink header.

    If you have any ideas for the above issue, please feel free to comment.

    My overarching question however, is this- is it feasible and/or advisable to create my custom splash page using the structure in my first paragraph; use a custom template to structure the splash page content, and then use a child theme to style that custom template?

    Thank you for reading, and for any thoughts or suggestions.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Can you post here the code you used to enqueue it?

    Thread Starter Arial73

    (@arial73)

    Here’s the code for the parent enqueue:

    <?php
    
    add_action( 'wp_enqueue_scripts', 'enqueue_parent_theme_style' );
    function enqueue_parent_theme_style() {
        wp_enqueue_style( 'parent-style', get_template_directory_uri().'https://www.pvccart.com/here/wp-content/themes/twentyeleven/style.css' );
    }

    Also, here’s my child theme style sheet for grins

    /*
     Theme Name:   Twenty Eleven Child
     Description:  Twenty Eleven Child Theme
     Template:     twentyeleven
     Version:      1
     Text Domain:  twenty-eleven-child
    */
    
    /* =Theme customization starts here
    -------------------------------------------------------------- */
    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    This

    wp_enqueue_style( 'parent-style', get_template_directory_uri().'https://www.pvccart.com/here/wp-content/themes/twentyeleven/style.css'

    Should be

    wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );

    Thread Starter Arial73

    (@arial73)

    Hi, sorry for the delay, I was out of town.

    Fixing the line of code in the functions.php file as you suggested did not allow the child theme to import all my parent styles.
    I’m still seeing, when I “preview” the child theme, a default twentyeleven template, with my website’s text, but none of my styling.

    Let me ask you this: when a child theme is made, it should inherit all the styling from the parent, and look exactly the same as the parent, correct?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Common ground between child themes and custom templates.’ is closed to new replies.