• Resolved BAMFSWAG

    (@bamfswag)


    I’m just trying to remove the header from ALL pages. The way I had done it, it simply left that space blank and still had to scroll down to get to the content, meaning, the header was still there but invisible. I wish to remove it entirely so that the content can scoot to the top of the page. I’m not very knowledgeable with PHP, but I can copy & paste with the best of them. If anyone can help, that’d be great.

    Here’s the Header code…

    <?php
    /**
     * The template for displaying the header
     *
     * Displays all of the head element and everything up until the "site-content" div.
     *
     * @package WordPress
     * @subpackage Twenty_Fifteen
     * @since Twenty Fifteen 1.0
     */
    ?><!DOCTYPE html>
    <html <?php language_attributes(); ?> class="no-js">
    <head>
    	<meta charset="<?php bloginfo( 'charset' ); ?>">
    	<meta name="viewport" content="width=device-width">
    	<link rel="profile" href="https://gmpg.org/xfn/11">
    	<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
    	<!--[if lt IE 9]>
    	<script src="<?php echo esc_url( get_template_directory_uri() ); ?>/js/html5.js"></script>
    	<![endif]-->
    	<?php wp_head(); ?>
    </head>
    
    <body <?php body_class(); ?>>
    <div id="page" class="hfeed site">
    	<a class="skip-link screen-reader-text" href="#content"><?php _e( 'Skip to content', 'twentyfifteen' ); ?></a>
    
    	<div id="sidebar" class="sidebar">
    		<header id="masthead" class="site-header" role="banner">
    			<div class="site-branding">
    				<?php
    					if ( is_front_page() && is_home() ) : ?>
    						<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' 
    
    ); ?></a></h1>
    					<?php else : ?>
    						<p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' 
    
    ); ?></a></p>
    					<?php endif;
    
    					$description = get_bloginfo( 'description', 'display' );
    					if ( $description || is_customize_preview() ) : ?>
    						<p class="site-description"><?php echo $description; ?></p>
    					<?php endif;
    				?>
    				<button class="secondary-toggle"><?php _e( 'Menu and widgets', 'twentyfifteen' ); ?></button>
    			</div><!-- .site-branding -->
    		</header><!-- .site-header -->
    
    		<?php get_sidebar(); ?>
    	</div><!-- .sidebar -->
    
    	<div id="content" class="site-content">
Viewing 15 replies - 16 through 30 (of 35 total)
  • Thread Starter BAMFSWAG

    (@bamfswag)

    I don’t mind the summary thing as much IF there was a way to show at least one image per post that would be visible from the main page of the blog.

    The problem seems to be that your theme wasn’t coded to display the entire content of the post, it was hardcoded to display only the excerpt. A difference of <?php the_excerpt(); ?> and <?php the_content(); ?>.

    Below, I’ve included a section of code that should replace lines 33 through 37 of the index.php file for your theme. It changes the_excerpt to the_content and removes the Read More link through the use of code commenting <!-- Commented Out Code -->. This should also allow you to see the images in your post.

    Please let me know if this solves your issue!

    <?php the_content(); ?>
    
    <!-- <div class="more">
    		<a class="readmore" href="<?php the_permalink() ?>" rel="bookmark"><?php _e( 'Read More &raquo;', 'myknowledgebase' ); ?></a>
    	</div> -->
    Thread Starter BAMFSWAG

    (@bamfswag)

    I did replace the code, and it fixed the image thing(thank you), but now there’s no divide between posts. If not for it being my own site, I could imagine that some might be confused with the setup. Yes? No?

    If you would like, you can add a simple horizontal line between posts with the tag <hr>.

    For example:

    <?php the_content(); ?>
    
    <!-- <div class="more">
    		<a class="readmore" href="<?php the_permalink() ?>" rel="bookmark"><?php _e( 'Read More &raquo;', 'myknowledgebase' ); ?></a>
    	</div> -->
    
    <hr>
    Thread Starter BAMFSWAG

    (@bamfswag)

    I’d also like to figure out how to remove the black background from that front page as well, since there’s an image behind it that can’t be seen at that size/space viewing. The only background part that I want black, are the parts where it says “Posted by…”. The rest of the backgrounds, all of them to my knowledge, I would like to be transparent. Is it as simple as replacing “none” to “transparent”?

    Thread Starter BAMFSWAG

    (@bamfswag)

    The last tag you sent, do I put that into every post or…which php page would that go into?

    Thread Starter BAMFSWAG

    (@bamfswag)

    Ok, I figured out the HR thing, and that seems to have done the trick. Now just to figure out the black background to make it invisible.

    Thread Starter BAMFSWAG

    (@bamfswag)

    Ok, one more thing then, I guess. haha …What is the official name of that box that has the “Posted by…”? If I can make that a black background, I think we’re pretty golden!

    WordPress, by default, does not have an option to add an alpha channel (transparency) to background colors. You could try a plugin to do that – I’m not 100% sure if one exists, but I’m currently looking into it.

    As far as the ‘Posted by box,’ it contains what is known as the Post Metadata. If you are talking about making the white border around the box black, put the CSS at the bottom of this post at the bottom of your style.css file.

    If you plan on updating this theme in the future, you should take note of the modifications that you have made or look into Child_Themes.

    Let me know if this helps!

    CSS to turn the box border black:

    .postmetadata {clear:both; margin:20px 0; padding:5px 10px; background:#000000; border:1px solid #000000 ! important;}

    If you would like the box border to be the same green as the rest of the green on your site, use the following:

    .postmetadata {clear:both; margin:20px 0; padding:5px 10px; background:#000000; border:1px solid #00ff00 ! important;}

    Thread Starter BAMFSWAG

    (@bamfswag)

    Actually, while we’re at it, I’d like the border of that box pink; ff0066, but to fill the color of the box with #000. Does that make sense?

    Thread Starter BAMFSWAG

    (@bamfswag)

    I got it!!! Thank you so much! You’ve been a tremendous help, and again, I appreciate your patience. ??

    Thread Starter BAMFSWAG

    (@bamfswag)

    Crap…ONE more thing? What about extra pages? I have a demo of a gallery display, that has a black background on it. Is there a way to remove the black background, so that the background image shows all the way around the gallery?

    Gallery Demo

    Have you added the background image to WordPress using the theme customizer?

    Thread Starter BAMFSWAG

    (@bamfswag)

    I added it directly by using Themes > Customize > Background Image. The background image IS loaded to the Media. For the background, I did not mess with the php files at all.

    Sorry, I didn’t see the black background behind the slider at first. Are you using a plugin to create the slider?

    Also, are you using a plugin to disable the right click feature? If so, could you disable it? It makes it difficult to inspect the page and suggest a solution.

Viewing 15 replies - 16 through 30 (of 35 total)
  • The topic ‘Header Removal From All Pages’ is closed to new replies.