Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I disable Site Title and Tagline on homepage? #41

Open
wilber82 opened this issue Jul 5, 2020 · 2 comments
Open

How can I disable Site Title and Tagline on homepage? #41

wilber82 opened this issue Jul 5, 2020 · 2 comments

Comments

@wilber82
Copy link

wilber82 commented Jul 5, 2020

I can disable Site Title and Tagline for the posting page in 'Site Identity" -> Display Site Title and Tagline.
But it's not applied to the homepage.

Is there a way to disable it on the homepage?

@anothermomo
Copy link

anothermomo commented Jul 14, 2020

You can achieve this effect by modifying the program source code. Just replace the existing contents of the file index.php in the theme with the following:

<?php
/**
 * The main template file
 *
 * @author Terry Lin
 * @link https://terryl.in/
 *
 * @package WordPress
 * @subpackage Mynote
 * @since 1.0.0
 * @version 1.0.7
 */
$custom_header_image = '';
$custom_header_css = '';
if ( has_header_image() ) {
	$custom_header_image = 'background-image: url(' . get_header_image() . ');';
	$custom_header_css = 'has-custom-header';
}

get_header(); ?>

<div class="data-schema">
	<main role="main" class="main-header <?php echo $custom_header_css; ?>">
		<div class="container mt-5">
			<div class="row row-layout-choice-home">
				<section id="main-container" class="<?php echo esc_attr( mynote_main_container_css() ); ?>">
					<?php get_template_part( 'loop' ); ?>
					<?php get_template_part( 'pagination' ); ?>
				</section>

				<?php if ( mynote_is_sidebar() ) : ?>
				<aside id="aside-container" class="col-lg-4 col-md-4 col-sm-12" role="complementary">
					<?php get_sidebar( 'home' ); ?>
				</aside>
				<?php endif; ?>
			</div>
		</div>
	</main>

	<br class="clearfix" />

	<?php if ( is_active_sidebar( 'sidebar-4' ) ) : ?>
	<aside class="home-middle-sidebar">
		<div class="container px-responsive">
			<div class="row my-4">
				<?php dynamic_sidebar( 'sidebar-4' ); ?>
			</div>
		</div>
	</aside>
	<?php endif; ?>

	<br class="clearfix" />

<?php get_footer(); ?>

@SorinGFS
Copy link

Is there a way to disable it on the homepage?

Why you not just leave them empty?
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants