cluelesskid Posted May 10, 2013 Share Posted May 10, 2013 I want my wordpress site running smoothly and I heard that poor coding can slow it down. The code I've put in sidebar-page.php is <div class="bgsidebar"> under the php code. <div id="sidebar" class="col-right"> <?php dynamic_sidebar('sidebar-page'); ?> </div><!-- /#sidebar --> <div class="bgsidebar"></div> If this isnt a good idea could somebody help me out on this. I'd really appreciate it. Thank you Quote Link to comment Share on other sites More sharing options...
trq Posted May 10, 2013 Share Posted May 10, 2013 I want my wordpress site running smoothly and I heard that poor coding can slow it down. If that were the case all Wordpress sites would grind to a halt. You haven't provided enough information for us to answer your question. Quote Link to comment Share on other sites More sharing options...
Jessica Posted May 12, 2013 Share Posted May 12, 2013 You added an empty div? Yes, that's bad coding. Quote Link to comment Share on other sites More sharing options...
cluelesskid Posted May 12, 2013 Author Share Posted May 12, 2013 You added an empty div? Yes, that's bad coding. I thought if I added text between the div then that would show up alongside the banner and cause problems in the layout. Quote Link to comment Share on other sites More sharing options...
Jessica Posted May 12, 2013 Share Posted May 12, 2013 Well that is a different question isn't it? Quote Link to comment Share on other sites More sharing options...
cluelesskid Posted May 15, 2013 Author Share Posted May 15, 2013 Well that is a different question isn't it? I dont want to add text I'd just like to know does having an empty div cause layout problems on some browsers and if so what do I need to input between the div to make the coding healthy/run smoothly? Quote Link to comment Share on other sites More sharing options...
Irate Posted May 15, 2013 Share Posted May 15, 2013 If you do not intend to place anything inbetween the <div>s, add a style attribute, set it to display: none; and change it at runtime with JavaScript if you need something displayed in it. That way you can be sure the document stays the same unless you want something to be displayed. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.