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.
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.
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
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
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
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
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
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’ ); } }
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’; }
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
The easiest way to add dynamic CSS is to put it inside a callback and hook the callback into the template, e.g. via wp_head (or wp_print_styles). You’ve not posted your code in full context, so you will need to modify to suit your specific needs. That said, here’s the basic principle: Callback function wpse_129259_enqueue_dynamic_css() { … Read more