How to Handle CSS Organization

If you have shell access to an Apache server, Google’s Mod Pagespeed is a great way to do so automatically at the server level. It has really powerful options for doing much more than just combining CSS and speeding up your sites. mod_pagespeed mod_pagespeed speeds up your site and reduces page load time. This open-source … Read more

How do i use fontawesome icons in TinyMce editor?

You wouldn’t be able to add a FontAwesome icon by passing it directly to the ed.addButton(); method unfortunately. You can try a workaround however. If you leave the image : url+’/youtube.png’ parameter out of the method then it will automatically create an empty <span> with the class of mceIcon & another class of mce_[plugin_name]. You … Read more

wp_head() gives me some weird CSS

The fact that <style type=”text/css” media=”screen”> html { margin-top: 32px !important; } * html body { margin-top: 32px !important; } @media screen and ( max-width: 782px ) { html { margin-top: 46px !important; } * html body { margin-top: 46px !important; } } </style> is added for Admin bar by wp-core at the top of … Read more

Assign a Class to the Current “Tag” for Formatting

Add something like this to the functions file: function current_tag($tags) { global $wp_query; $cid = $wp_query->query_vars[‘cat’]; foreach($tags as $tag) { // match tagid to $cid } } add_filter( ‘get_the_tags’, ‘current_tag’); This won’t work by itself, but it will be a good start for getting the right information to the right place.

How do I add a search bar to my header?

Just add to your theme this code: <?php get_search_form(); ?> This code will echoing search form so place it everywhere where you want to have the search form. Further you need to have search.php file in your theme which will show the search results. You can use ordinary WP loop in the file.

How to specify a class added to my gallery

Here are three methods Approach #1 It’s common to wrap the output with custom HTML. We can do that by using the post_gallery filter and the gallery_shortcode() callback: /** * HTML Wrapper – Support for a custom class attribute in the native gallery shortcode */ add_filter( ‘post_gallery’, function( $html, $attr, $instance ) { if( isset( … Read more

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