• Resolved Ashtanga

    (@ashtanga)


    Hi,

    Beginner here trying to make a minimalist site and I have a few sticking points. The one for this thread is removing the home button. What code would I disable or delete to do this? I think it’s in the header.php but not sure.I have deleted all custom menus.

    Not sure if it’s related or for another thread but in the same place in mobile versions is a “Menu” button that I want to remove as well because I am not using any pages, only posts (acting as pages)

    My site for now is

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter Ashtanga

    (@ashtanga)

    Not sure why site didn’t show up

    https://sunblue.mjit.org

    This is temporary until I get the site fully built.

    Try using a custom menu and only add the pages you want. That’s found in appearance > menus. Then either in your appearance > theme options or in the customize section in appearance > customize and you can set the menu there (i’m not 100% sure on this particular theme).

    Thread Starter Ashtanga

    (@ashtanga)

    Thanks for reply but the point is I don’t want any pages. Just a minimalist site that only has the posts. I’m think there must be a bit of code one can disable or delete to shut the home and menu buttons off.

    ooo… gotcha

    Try this:

    .main-navigation {

    display: none;

    }

    I would also recommend finding the main navigation area in the header.php file and just delete it. The display:none does not play nice in chrome especially.

    Make sure you are doing all of these changes in a child theme.

    Thread Starter Ashtanga

    (@ashtanga)

    Ok that worked ?? tyvm.

    Not sure what I would cut out of the header.php though.

    <?php
    /**
     * The Header for our theme.
     *
     * Displays all of the <head> section and everything up till <div id="main">
     *
     * @package Spun
     * @since Spun 1.0
     */
    ?><!DOCTYPE html>
    <html <?php language_attributes(); ?>>
    <head>
    <?php if ( function_exists( 'ps_012_m17n_bread_crumb' ) ) ps_012_m17n_bread_crumb(); ?>
    <?php if ( function_exists( 'ps_012_multilingual_list' ) ) ps_012_multilingual_list(); ?>
    <meta charset="<?php bloginfo( 'charset' ); ?>" />
    <meta name="viewport" content="width=device-width" />
    <title><?php
    	/*
    	 * Print the <title> tag based on what is being viewed.
    	 */
    	global $page, $paged;
    
    	wp_title( '|', true, 'right' );
    
    	// Add the blog name.
    	bloginfo( 'name' );
    
    	// Add the blog description for the home/front page.
    	$site_description = get_bloginfo( 'description', 'display' );
    	if ( $site_description && ( is_home() || is_front_page() ) )
    		echo " | $site_description";
    
    	// Add a page number if necessary:
    	if ( $paged >= 2 || $page >= 2 )
    		echo ' | ' . sprintf( __( 'Page %s', 'spun' ), max( $paged, $page ) );
    
    	?></title>
    <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 get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
    <![endif]-->
    
    <?php wp_head(); ?>
    <?php if (function_exists('qtrans_generateLanguageSelectCode')) { echo qtrans_generateLanguageSelectCode('image'); } ?>
    
    </head>
    
    <body <?php body_class(); ?>>
    <div id="page" class="hfeed site">
    	<?php do_action( 'before' ); ?>
    	<header id="masthead" class="site-header" role="banner">
    		<?php $header_image = get_header_image();
    		if ( ! empty( $header_image ) ) { ?>
    			<a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
    				<img src="<?php header_image(); ?>" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" 
    
    alt="" />
    			</a>
    		<?php } // if ( ! empty( $header_image ) ) ?>
    		<hgroup>
    			<h1 class="site-title"><a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php 
    
    bloginfo( 'name' ); ?></a></h1>
    		</hgroup>
    
    		<nav role="navigation" class="site-navigation main-navigation">
    			<h1 class="assistive-text"><?php _e( 'Menu', 'spun' ); ?></h1>
    			<div class="assistive-text skip-link"><a href="#content" title="<?php esc_attr_e( 'Skip to content', 'spun' ); ?>"><?php _e( 'Skip to content', 'spun' 
    
    ); ?></a></div>
    
    			<?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
    		</nav><!-- .site-navigation .main-navigation -->
    	</header><!-- #masthead .site-header -->
    
    	<div id="main" class="site-main">

    Ok awesome. yeah that can get a little hairy but it would be somewhere near this

    <nav role="navigation" class="site-navigation main-navigation">

    Best of luck. Glad I could help.

    Thread Starter Ashtanga

    (@ashtanga)

    Hairy indeed. I will play around with this weekend and post the “offending” code if I get it so that others can benefit. If anyone knows the exact lines to delete, please post.

    The CSS code you gave works on my (latest) versions of Chrome, IE and Firefox so you might be referring to earlier versions of Chrome.

    Awesome. I was fighting with that early this week on my site.

    Glad it worked.

    Thread Starter Ashtanga

    (@ashtanga)

    I have yet to see a problem so i have opted not to delete code in the header until I see something come up. I am marking this thread as resolved.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Remove Home Button (top right)’ is closed to new replies.