Wordpress .entry-content class will not properly align with sidebar - css

I've encountered another silly problem while trying to enable sidebar on pages on Wordpress Twentyeleven theme.
I've given my .entry-content class:
.entry-content {float:left !important;width:648px !important;}
excuse me for those !importants, I just don't dare to edit the default style.css...
Now I've added
<?php get_sidebar(); ?>
By the end of page.php, just above the get_footer stuff... and sidebar apparently displays UNDER my .entry-content, on the right hand side....
I've trying giving the sidebar a float:right, but it still won't float.
Here is an example.

Inside <div id="main"> you have a <div id="primary">.
Set a width on the primary div and this is solved.
Like this: #primary {width:400px;}

Related

WordPress with Fullpage.js to include footer

I don't have a codepen to reproduce this cause it's more of a WordPress issue than a fullpage.js issue. I have a client that has a WP site and wants to integrate fullpage scrolling on their homepage. I have successfully integrated fullpage.js into it, and it works as expected (no plugins). My problem is that I cannot seem to find a way to include the footer. I have given it the "section" and "fp-auto-height" classes, as the documentation suggests, but it still isn't showing. I realized that the footer was outside the fullpage div I created, since fullpage.js is only for the front page, so I tried wrapping the <? get_footer(); ?> on the front page within the fullpage div, which actually wraps it in the DOM, and the additional styling/divs (that are automatically applied by fullpage.js) were applied to the footer section, however, it still wasn't showing. Essentially it looked like this:
<div id="fullpage">
<div class="section"></div>
<div class="section"></div>
<div class="section"></div>
<div class="section"></div>
<? get_footer(); ?>
</div>
and within footer.php I have this:
<footer class="section fp-auto-height">
//content
</footer>
I realize this is difficult to diagnose without having a codepen to troubleshoot on, but any help/suggestions are appreciated.

How to Manage Wordpress theme header margin

I have a Indian Chat Room Website
I am creating a custom theme, and elements behave as they should but when I place the <?php wp_head() ?> tag I get a top margin, at the top of my theme header.
When I remove the <?php wp_head(); ?> the margin goes away. I have been at this for a while any help would be great.
Can you add the <?php wp_head(); ?> so I can take a look at your website.
Also try this in your CSS:
html{ margin-top:0px !important;}

Add an image to header of Enfold theme

I've a WP site with the Enfold-child theme. For the header, I choose to place the company logo upper left and main menu under the company logo. I would like to add an image on the right of the company logo but I don't try to do this.
Last part of header.php is the following
<?php
if(!$blank) //blank templates dont display header nor footer
{
//fetch the template file that holds the main menu, located in includes/helper-menu-main.php
get_template_part( 'includes/helper', 'main-menu' );
} ?>
<div id='main' class='all_colors' data-scroll-offset='<?php echo avia_header_setting('header_scroll_offset'); ?>'>
<?php
if(isset($avia_config['temp_logo_container'])) echo $avia_config['temp_logo_container'];
do_action('ava_after_main_container');
?>
Have I to modify this file to add the image? Can you help me, please?
Thanks!
try this. It's a Knowledgebase article from Enfold detailing how to add a Widget area to the header for adding custom code, ie an image.
It's what we use to do exactly that.
: http://www.kriesi.at/documentation/enfold/adding-a-widget-area-to-the-header/
if you do not want to touch the header.php you may consider using a css ::after selector

Joomla 3 Hide a position on certain pages

I have a custom template that I am using in my website. To the right of my pages I have a position with a background color that I do not want to display on my terms of use page. The position contains a twitter module which I can remove from the page but I am still left with a small box containing the background color from the css. Can I completely remove this position from just the terms of use page.
In your Terms of use page, add a custom class say terms-of-use and then override it with background: transparent
The dynamic custom class can be generated through Adding custom class on Joomla pages
CSS
body.terms-of-use .social {
background: transparent;
}
Output:
You can edit the html template, look for the place where the module is shown in the index.php will be like this ...
<jdoc:include type="modules" name="social" style="none" />
And add some code in PHP, so that only the module is displayed, when the module is published. In this way joomla will not write anything if there is no content to show and will not need to do anything in the CSS, besides improving the loading of the page.
<?php if($this->countModules('social')) : ?>
<jdoc:include type="modules" name="social" style="none" />
<?php endif; ?>

CSS specific rule for sidebar in wordpress on one page

Hey I have a wordpress blog, and I need to add some negative margin on the sidebar on the index page, but not on any other page, the trouble is since the sidebar is in "sidebar.php" and the head element is in "header.php" so I can't use inline styles or styles just for that page.
Any ways of achieving this?
I would assume a PHP if statement in the header?
For the moment I've used a style element within the body.
I haven't used wordpress in some time, but from what I remember, there was a specific home/index template... You could wrap the sidebar in a tag and sub-reference that through css.
css:
#sidebar-fix #sidebar element {...}
html:
<div id="sidebar-fix"><?#sidebar include?></div>
You can use the is_page function to single out the page you want. Here is an example and a link.
<?php if (is_page('My Page')) { ?>
<style type="text/css">Your style here</style>
<?php } ?>
http://codex.wordpress.org/Function_Reference/is_page

Resources