A div which appears on homepage is:
nv-sidebar-wrap col-sm-12 nv-right blog-sidebar
Is there any option which makes sidebar displaying on homepage or is it just error?
Now this data is not seen on homepage on the url that I have sent, as I had to remove it – but the problem is still actuall.
It is not the first time that I have this problem with Neve theme – so it is not rather a matter of plugin conflict or so, as I tried this on fresh WP instalation.
I have a WordPress website called Www.StockPicksNYC.com
Its a “Shell Lite”Theme
I really don’t want to switch my theme. i really like it.
Im tried a few plugins but no luck. If you know of any plug ins that would solve my issue I would appreciate it.
i have have to do some css or php HTML and that’s OK too. step by step instructions would help. I’m a beginner but a quick learner. I built my website from scratch.
I just need a little help here. The sidebar is a must , and I am stuck.
Thanks
I am new to WordPress and by no means an expert but I resolved the issue under my own steam and found a fairly simple solution.
IMPORTANT! Both solutions lined out below require you to assign a page as your homepage in Settings->Reading->Front page displays, in the Admin area.
Remove Sidebar from Homepage only
I only wanted to remove it from the homepage so here is how I did that.
<div id="page" class="hfeed site">
<div id="page" class="hfeed site<?php if(is_front_page()){ echo ' homepage'; } ?>">
get_sidebar();
if(!is_front_page()){
get_sidebar();
}
This will then prevent the sidebar content being called on the homepage.
.homepage:before {
display: none;
}
.homepage .site-content {
margin-left: 0px;
}
These 2 styles will then only be assigned to the homepage. The first style removes the black background of the sidebar, whilst the second aligns the content to the left side remove the big margin.
Remove from ALL pages
I have not used this solution so cannot comment on its working but it should be fine.
get_sidebar();
if(!is_front_page()){
get_sidebar();
}
This will then prevent the sidebar content being called on the homepage.
#page:before {
display: none;
}
#page .site-content {
margin-left: 0px;
}
These 2 styles will then only be assigned to the homepage. The first style removes the black background of the sidebar, whilst the second aligns the content to the left side remove the big margin.
I hope these solutions work for people. If so please comment so others can also take advantage of this problem.
]]>I m having trouble to add a sidebar on my homepage : https://e-smokersoz.com/
As you can see i managed but it s not properly positioned, it s too much on the right.
My template didn t include a sidebar on the homepage originally. I had to add one in the page-home.php :
<?php
/**
* Template Name: Home Page
*/
get_header(); ?>
<div style="float: right;">
<?php get_sidebar(blog) ?>
</div>
<div class="motopress-wrapper content-holder clearfix">
<div class="row">
<div class="container">
<div class="span12" data-motopress-wrapper-file="page-home.php" data-motopress-wrapper-type="content">
<div class="row">
<div class="span12" data-motopress-type="loop" data-motopress-loop-file="loop/loop-page.php">
<?php get_template_part("loop/loop-page"); ?>
</div>
</div>
</div>
</div>
</div>
</div>
<?php get_footer(); ?>
Iam not good at all at coding, and i ve spent 6 ours trying to put it few centimetre more on the left .. -_-“””
If any of u have an idea of how to fix this, that d be amazing !!
Cheers, have a good one =)
[When posting code, use backticks or code button]
I copied the page template and renamed it homepage and then removed <?php get_sidebar(); ?> from the page template and added
<?php
/*
Template Name: Home
*/
?>
to the top.
However, now the sidebar has been removed from all pages. How do I make sure the home page is using the homepage.php template?
Thank you!
]]>