• hi, i have set up my website http://www.circusreading.com but need to remove the space at the top of each page below the menu bar. I think it is due to the page title, which I do not want to show on each page. How can I get rid of this? I have tried everything on this site so far, but it still is not working and I am wondering if I have set up the child theme incorrectly. I have been able to edit the footer.php file using the child theme and this has worked fine, as I just copied the whole of the footer.php file to the child theme. But I dont think I need to do this for the style.css file?? Desperate for help before I tear my hair out.

    What I have done so far:

    – set up child folder. Editorial-child
    – set up style.css (code)
    /*
    Theme Name: Editorial-Child
    Theme URI: https://mysterythemes.com/wp-themes/editorial/
    Description: Hayley edit
    Author: Hayley
    Author URI: https://mysterythemes.com/
    Template: editorial
    Version: 1.0.0
    License: GNU General Public License v2 or later
    License URI: http://www.gnu.org/licenses/gpl-2.0.html
    Tags: light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
    Text Domain: editorial
    */

    – set up the functions php (code)

    <?php
    function my_theme_enqueue_styles() {

    $parent_style = ‘parent-style’;

    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’ );
    ?>

    – set up index.php file (code)

    <?php
    /**
    * The main template file.
    *
    * This is the most generic template file in a WordPress theme
    * and one of the two required files for a theme (the other being style.css).
    * It is used to display a page when nothing more specific matches a query.
    * E.g., it puts together the home page when no home.php file exists.
    *
    * @link https://codex.ww.wp.xz.cn/Template_Hierarchy
    *
    * @package Mystery Themes
    * @subpackage Editorial
    * @since 1.0.0
    */

    get_header(); ?>

    <div id=”primary” class=”content-area”>
    <main id=”main” class=”site-main” role=”main”>

    <?php
    if ( have_posts() ) :

    if ( is_home() && ! is_front_page() ) : ?>
    <header>
    <h1 class=”page-title screen-reader-text”><?php single_post_title(); ?></h1>
    </header>

    <?php
    endif;

    /* Start the Loop */
    while ( have_posts() ) : the_post();

    /*
    * Include the Post-Format-specific template for the content.
    * If you want to override this in a child theme, then include a file
    * called content-___.php (where ___ is the Post Format name) and that will be used instead.
    */
    get_template_part( ‘template-parts/content’, get_post_format() );

    endwhile;

    the_posts_navigation();

    else :

    get_template_part( ‘template-parts/content’, ‘none’ );

    endif; ?>

    </main><!– #main –>
    </div><!– #primary –>

    <?php
    get_sidebar();
    get_footer();

Viewing 5 replies - 1 through 5 (of 5 total)
  • lisa

    (@contentiskey)

    no need to copy all of the stuff that is in the parent theme style.css into the child theme css file
    in the child theme style.css file, include only the new styles and changed styles.

    Thread Starter hay89

    (@hay89)

    Hi, thank you. Ive just removed everything from the style.css page and now entered this:

    .page-header .page-title {
    color: #333333;
    padding-bottom: 0px;
    display: none;
    }

    and it still doesnt work. New to this, so any detail in where I am going wrong would be much appreciated.

    lisa

    (@contentiskey)

    what is the end result you are trying to accomplish for page titles?

    Thread Starter hay89

    (@hay89)

    When connecting to the site via my mobile there is a space above the first bit of content. I want that removed so it is just the menu. And then the content. Best wishes. Hayleh

    lisa

    (@contentiskey)

    is this the theme you are using?
    https://ww.wp.xz.cn/themes/editorial/

    for theme specific questions that likely involve adjusting CSS media queries for small device (mobile) display, the theme’s support team will be best suited to give accurate answer.

    https://ww.wp.xz.cn/support/theme/editorial
    I suggest starting a new forum topic since the question you have now is not really about “child theme creation”.

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

The topic ‘Need help with child theme creation’ is closed to new replies.