• Resolved adamlgraham

    (@adamlgraham)


    Hello,

    My site is adamgraham.com.
    The page in question is the home/front page.

    I’m using the “Tracks” theme for my website. I want to use a static front page without a title. I have created a child theme and a page template in order to do this. I have managed to remove the title text itself, but there is also a horizontal bar that separates the title from the page content. I would like to remove it as well, but can’t find it in the code.

    Here is the current code (note: I have code for a slider in there too):

    <?php
    /*
     * Template Name: Page NoTitle
     * Description: A Page Template with no title.
     */
    get_header(); ?>
    <div class='entry'>
    	<?php
        if(get_theme_mod('premium_layouts_setting') == 'full-width-images' || get_theme_mod('premium_layouts_setting') == 'two-column-images'){
            if (has_post_thumbnail( $post->ID ) ) {
                echo "<div class='featured-image-container'>";
                ct_tracks_featured_image();
                echo "</div>";
            }
        } else {
            ct_tracks_featured_image();
        }
        ?>
    	<div class='entry-header'>
    
        </div>
        <div class="entry-container">
            <div class='entry-content'>
                <article>
                    <?php the_content(); ?>
                    <?php wp_link_pages(array('before' => '<p class="singular-pagination">' . __('Pages:','tracks'), 'after' => '</p>', ) ); ?>
                </article>
            </div>
            <?php get_template_part('sidebar','after-page-content'); ?>
        </div>
    </div>

    Any help would be greatly appreciated.
    Thanks in advance.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Theme Author Ben Sibley

    (@bensibley)

    Thanks for sharing so much detail. To accomplish this, you can remove the “entry-header” div from the template. That will get rid of the line.

    Since it will also remove the padding, you can restore the padding by adding it to the “entry-container” div like this:

    .page-template-content-notitle .entry-container {
      padding-top: 24px !important;
    }

    The above CSS will only affect the entry-container on pages using your No Title template.

    Thread Starter adamlgraham

    (@adamlgraham)

    Thanks for the reply, Ben.

    Removing the “entry-header” div did remove the separator, but it also removed the padding as you said it would.
    I’m pretty new to all of this, so I’m not sure where to put the code you posted though. I tried a few different configurations, but none quite did the job

    Where I have it now does restore the padding, but I’m left with “.content-page-notitle .entry-container { padding-top: 24px !important; }” visible in the padding.

    Here’s what it looks like now:

    <div class="entry-container">
    	.page-template-content-notitle .entry-container {
    	  padding-top: 24px !important;
    	}
            <div class='entry-content'>
                <article>
                    <?php the_content(); ?>
                    <?php wp_link_pages(array('before' => '<p class="singular-pagination">' . __('Pages:','tracks'), 'after' => '</p>', ) ); ?>
                </article>
            </div>
            <?php get_template_part('sidebar','after-page-content'); ?>
        </div>

    Edited for clarification and to fix formatting in the code.

    Theme Author Ben Sibley

    (@bensibley)

    Sure, let me clarify. The CSS above can be copied and pasted into the “Custom CSS” section in the Customizer (Appearance > Customize). Once added there, it should take affect right away.

    Thread Starter adamlgraham

    (@adamlgraham)

    Ahh, I see. It’s CSS. I knew it didn’t quite fit in there, which is why I wasn’t sure where to put it.

    Well, the issue is resolved. Thanks a lot for your help.

    Theme Author Ben Sibley

    (@bensibley)

    No problem, glad it’s fixed now 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to Remove Separator Bar from Top of Page ("Tracks" Theme)’ is closed to new replies.