How to know which order WordPress places CSS files?

1. Don’t edit your theme using the WordPress editor. This is a quick-and-dirty approach to development, but you can easily destroy your entire site by mistake with this tool. Instead, edit the files on your machine locally and then use FTP to upload the changed files to the server. 2. Moving the CSS will break … Read more

Search Bar in Thesis WordPress Site

The incorrect search is found under nav_container and is the second node div.search. Deleting the div with the search class ( div.search ) will remove that search bar and all the elements that came with it.

custom header navigation has odd spacing [closed]

I’m not sure what’s causing the causation of your problem, but for some reason the <li> tags are not being added around the “portfolio” menu item, when you visit the blog page. Maybe you can see why in the custom header menu code?! The <li> tags are what creates the spacing(padding-right) in between each menu … Read more

Display Something in the Header After All Styles are Loaded

Hook to wp_enqueue_scripts with a high priority number. For example: function load_my_style_wpse_90225() { wp_register_style( ‘mystyle’, get_template_directory_uri() .’/path/to/stylesheet.css’); wp_enqueue_style( ‘mystyle’ ); } add_action(‘wp_enqueue_scripts’,’load_my_style_wpse_90225′,1000); That should reasonably load last in line. Basically the same answer as here: Wooslider custom css Refernce http://codex.wordpress.org/Function_Reference/add_action

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

WordPress code editor messed up my code!

This isn’t as good as line numbers but you can add a dummy class every so often. #_________section_1 { display: none; /* Just in-case it strips the empties */ }; It may help you to quickly scroll to the relevant section. To be honest though, you should have a mirror of your site stored locally … Read more

Style file inclusion

You need to hook it to an action. Add the below code to the theme’s functions.php file. It should work. add_action( ‘wp_enqueue_scripts’, ‘theme_flexslider_css’ ); function theme_flexslider_css() { wp_register_style( ‘flexslider’, get_template_directory_uri() . ‘/css/flexslider.css’ ); if( is_page( ‘home’ ) ) { wp_enqueue_style( ‘flexslider’ ); } }

Where do I go to change the position of the style.css?

Add the following code to themes functions.php file. Replace ‘http://cdn.something.com/something.css‘ to your stylesheet file uri on CDN. add_filter(‘stylesheet_uri’, ‘my_custom_stylesheet_location’); function my_custom_stylesheet_location( $stylesheet_uri ){ return ‘http://cdn.something.com/something.css’; }

Adding CSS to Blog Posts?

You can use PHP code in your child themes functions.php file to add a custom body class to any page/post etc. add_filter( ‘body_class’, ‘my_custom_body_class’ ); function my_custom_body_class( $classes ) { if ( is_single( ‘007’ )) $classes[] = ‘custom-class’; return $classes; } This sample code will add a custom body class to the post with i.d … Read more