wordpress css file

Try to use relative URLs to your imported css files. So try to remove first / from each import URL: @import url(‘styles/forms.css’); @import url(‘styles/tables.css’); @import url(‘styles/homepage.css’); @import url(‘styles/reset.css’); @import url(‘styles/stimenu.css’); @import url(‘styles/layout.css’); @import url(‘styles/demo.css’); Also pay attention to the fact that using @import directives is bad practice and strongly not recommended to use. Use link … Read more

Internet Explorer ignore my css

This is not a WordPress question but a general HTML / CSS question, as such you will likely get better answers elsewhere (StackOverflow). If you add this to your meta tags inside the head tag: <meta http-equiv=”X-UA-Compatible” content=”IE=EmulateIE7″ /> This will render the page like IE7. However I don’t recommend this; if you are developing … Read more

loading a custom stylesheet in a function

To include custom styles and scripts, you should be using wp_enqueue_style() like so: add_action(‘admin_enqueue_scripts’, my_enqueue_admin_styles); function my_enqueue_admin_styles() { wp_enqueue_style(‘my-admin-style’, get_bloginfo(‘template_url’) . ‘/css/style.css’, array(), ‘screen’); } You want to use this method, as it will add your CSS after the default and thus it will allow you to overwrite the WP styles. Then, look at the … Read more

Change background color of subpages

Another solution could be you register a meta box for the project pages which lets you type in whatever class name you want for each page… function add_project_page_metabox() { add_meta_box( ‘project_page_meta’, // $id ‘Project Meta’, // $title ‘ppm_callback’, // $callback ‘page’, // $post_type ‘side’, // $context ‘low’ // $priority ); } add_action( ‘admin_init’, ‘add_project_page_metabox’ ); … Read more

Cannot apply custom css to IE in the theme

Looks like TwentyFourteen includes the ie.css stylesheet within a ‘less than IE 9‘ conditional tag, which would explain why it’s not working for IE11. <!–[if lt IE 9]> <link rel=”stylesheet” id=’twentyfourteen-ie-css’ href=”http://localhost/wordpress_answers/wp-content/themes/twentyfourteen/css/ie.css” type=”text/css” media=”all” /> <![endif]–> Sounds like you’ll want to enqueue your own IE specific stylesheet. This is probably done cleanest from within a … Read more

Seperate functions.php for part of site

functions.php unfortunately is very ingrained part of theme load process. If your architecture is flexible enough you should be able to conditionally unhook related bits. Even if it’s not — templates give you complete control over page output. You could go as far as completely omitting wp_head()/wp_footer() calls and handle assets (semi-)manually if that is … Read more