Loading css files conditionally useful?

There is no hard rule on this. Loading JS is discussed often because JS is more likely to conflict when a lot of plugins throw their scripts into the mix. CSS is less problematic in that regard. Still the same premise apply — you should aim for solution that performs well. In a situation you … Read more

How to change in css with a custom theme?

Since you are working on a child theme you could try the following. This requires that you have removed @import from your child themes style.css or removed the hook, that loads the parent stylesheet in your child themes functions.php. Add this to your functions.php in the child theme: function wp_enq_theme_styles() { $parent_style=”parent-style”; wp_enqueue_style( ‘parent-style’, get_template_directory_uri() … Read more

How to enqueue google fonts if we use directly in style.css

I have registered google fonts in my theme function file, then used it in style.css. function register_google_fonts() { wp_register_style( ‘googleFonts’, ‘http://fonts.googleapis.com/css?family=Open+Sans:400,300’); wp_enqueue_style( ‘googleFonts’); } add_action( ‘wp_enqueue_scripts’, ‘register_google_fonts’ ); style.css .cssClass { font-family: ‘Open Sans’, sans-serif; } First, theme will try to load the Google font Open Sans if not then use the next font sans-serif

WordPress – Portfolio – Change number of items in a row

I guess if you change this line of code it will make 4 portfolio items in a row. change this : .portfolio_item { width: 20%; margin-bottom: 40px; } to this : .portfolio_item { width: 25%; margin-bottom: 40px; } divide 100 to no of columns you want. e.g 100/4 = 25 so 25% for 4 items … Read more

The placeholder text doesnt disappear

I believe this script will work for you: $(‘[placeholder]’).each(function(){ var $this = $(this); $this.data(‘placeholder’, $this.attr(‘placeholder’)) .focus(function(){$this.removeAttr(‘placeholder’);}) .blur(function(){$this.attr(‘placeholder’, $this.data(‘placeholder’));}); });

Editing anchor style in main navigation bar

Sounds like you need to properly target your HTML elements. It is also not clear from your explanation what needs to happen. More code would definitely help explain what you need. Please improve the quality of your question. With that said, I’ll give it a shot: anchor 1 has different styling because you’re hovering the … Read more