Load jQuery only on home page

WordPress adds a series of classes to the body tag (assuming your theme-designer used body_class()) depending on which page you’re currently viewing. On the homepage, WordPress adds the home class. You could use this to target only the sidebar viewed on the homepage: body.home .classname { position: relative; top: -300px; }

css file status 403

403 Forbidden is a permissions error, check that the file has proper permissions for public access on your server.

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

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

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)