Remove everything but slider from homepage

If you find this tweak helpful:

Beginners

Tweaking Elegant Themes involves creating a child theme and editing PHP and CSS files within a text editor. If you have never done this you may want to read our guide on creating a child theme. All tweaks are written with the assumption that you have a default installation of your theme.  Any tweaks or changes you may have previously made to your theme could affect the outcome of the tweaks on this site. All tweaks should be tested before applying to a live site. 

Since DeepFocus is designed as a portfolio theme, some users would like to remove everything that would distract from their work. This tweak will remove the content areas and recent work areas from the homepage, leaving only the slider. There are two methods for this. The CSS method is much easier but might not work depending on how your homepage is set up. If it doesn't remove everything, the PHP method definitely will.

CSS

Locate your style.css file in /deepfocus-child/

Add the following code:

a.entergallery {
display: none;
}

h3.recentworks {
display: none;
}

#portfolio-items {
display: none;
}

.service {
display: none;
}

If the code above does not remove everything or causes side effects in other pages of your site, use the method below. 

PHP

Create a file called home.php in the folder /themes/deepfocus-child/

Add the following code to this file:

<?php get_header(); ?>

<div id="content-full">
<div id="home-top"></div>
<div id="hr">
<div id="hr-center">
<div id="intro">
<div class="center-highlight">

<div class="container">

<?php if (get_option('deepfocus_featured') == 'on') get_template_part('includes/featured'); ?>

<?php if (get_option('deepfocus_quote') == 'on') { ?>
<div id="tagline">
<p><?php echo wp_kses_post(get_option('deepfocus_quote_one')); ?></p>
<span class="quote2"><?php echo wp_kses_post(get_option('deepfocus_quote_two')); ?></span>
</div> <!-- end #tagline-->
<?php } ?>

</div> <!-- end .container -->
</div> <!-- end .center-highlight -->
</div> <!-- end #intro -->
</div> <!-- end #hr-center -->
</div> <!-- end #hr -->

<?php get_footer(); ?>

That's it. This will remove everything between the homepage slider and footer.

Post a Reply

Your email address will not be published. Required fields are marked *

Pin It on Pinterest

Share This