Ordering stylesheet above using functions.php

You should not be outputting anything on the wp_enqueue_scripts hook, just enqueueing. Move your css output to a function hooked to wp_head with a lower priority than 8, which is when the enqueued styles are printed in wp_head: function folio_enqueue_css() { wp_enqueue_style( ‘theme’, get_template_directory_uri() . ‘/assets/css/style.css’, false, ‘1.0’, ‘all’ ); } add_action( ‘wp_enqueue_scripts’, ‘folio_enqueue_css’, 1 … Read more

Using post_class to style posts indivdually

You should be using post_class (and body_class for that matter) but you don’t need it for this. Alter your Loop on your home page to conditionally format the first post. $first = (!is_paged()) ? true : false; if (have_posts()) { while (have_posts()) { the_post(); if ($first) { // code to format the first post $first … Read more

Styling the second sidebar

Per the register_sidebars() Codex page, the CSS ID of the sidebars gets incremented by default. In other words, if you’re not explicitly setting the id array value — and in your code sample above, you aren’t — you would end up with sidebars with CSS IDs of sidebar and sidebar-2. You can then style them … Read more

How to show one post different from the rest?

The code you posted will only make difference in adding <div class=”first-post”></div> for the first post, so it still displays same information for all posts. Try this instead: <?php $queryObject = new Wp_Query( array( ‘showposts’ => 5, ‘post_type’ => array(‘post’), ‘category_name’ => videos, ‘orderby’ => 1, )); // The Loop if ( $queryObject->have_posts() ) : … Read more

Infinite scroll messing up nth:of-type

You’ve got to take the type in :nth-of-type() literally. It only takes into account the type of the element (in this case DIV). The selector doesn’t matter. :nth-of-type() works the same, except that it only considers element of the given type. http://quirksmode.org/css/selectors/nthchild.html Unfortunately I can’t imagine there is a nice solution for the moment. Maybe … Read more

Are there any official or unofficial guidelines for the styling of a widget?

A theme has near complete control over the appearance of a site, including the widgets. And any plugin could load a stylesheet that overrides elements of your, intentionally or not. There are guidelines to encourage certain standards of code quality, which are enforced to some degree if the plugin/theme is hosted on the WordPress.org plugin … Read more