Allow WordPress Contributors to Upload Images, Not All Kind of Files

Go dashboard -> Appearance -> Theme Editor -> Theme Functions Add the following php code // Let Contributor Role to Upload Media if( current_user_can( ‘contributor’ ) && ! current_user_can( ‘upload_files’ ) ) add_action( ‘admin_init’, ‘allow_contributor_uploads’ ); function allow_contributor_uploads() { $contributor = get_role( ‘contributor’ ); $contributor->add_cap( ‘upload_files’ ); } // Upload Images Only add_filter(‘upload_mimes’, ‘custom_upload_mimes’); function … Read more

Click to View All Content .Js – Show More Content on Click

The resource of click to view more content. HTML code: This is free script from webenlance Dr. Anil Kohli is an Endodontist, Dental Surgeon and Dentist in Lajpat Nagar, Delhi and has an experience of 40 years in these fields. Dr. Anil Kohli practices at Duis nisl nibh, egestas at fermentum at, viverra et purus. … Read more

[Solved] How to Remove WordPress Menu Class & ID

Some of you may want to remove wp_nav_menu remove classes from li Just like this: Intro Portfolio Contact Blog Shop If you don’t know how to remove the class and id, here is the solution. I used the ideas on stackoverflow here, but it didn’t work for me, I use the following code, and it … Read more

WordPress Responsive Captions & Images

Wordpress image captions responsive

More and more people using mobile and pad to surfer the internet these days, for most of the websites, 60-80% visitors using mobile now, so make your site responsive is accessory. For some of the “old” WordPress themes, they’re responsive, but the images you insert with captions don’t behave responsive, I have found some solutions, … Read more

WordPress Use Google Custom Search Without Plugins

Google-Search-and-WordPress

How to Implement Google Custom Search Results into WordPress Based Websites Without Plugins
WordPress has a relatively good search functionality but tends to get sluggish and doesn’t match keywords that well, and of course when you make a search, WordPress will use a lot resources, why not use the Google custom search instead the default search forms? This is even more apparent when your site is quite large and you have many posts and/or pages. In addition, wordpress search functionality display results ordered by date and not by its relevance to the keywords. If you want to use Google custom search, here are 2 popular Google Custom Search plugins for you to choose from:

Google-Search-and-WordPress
Google-Search-and-WordPress

1) Google Custom Search Plugin

2) Google Custom Search for WordPress

If you don’t want to use plugin, and want to use the Google custom search engine to replace the WordPress default search, you can follow this guide:

How to replace the WordPress search function with Google Custom Search engine

Read more

How to Make Good Use of WordPress Post Class

If you want to change the default WordPress post class, you can follow this guide to change it by yourself. It can be ‘easy as’ in the content loop adding a bit of code with a call to post_class(), we can easy add a new class like this, post_class(‘my-class’) then we just style the new class in our style.css.

Read more

Remove The WordPress Comment URL Links

If you want to remove the WordPress comment url links, you can add the following code to the functions.php function dobeweb_remove_comment_fields($fields) { unset($fields[‘url’]); return $fields; } add_filter(‘comment_form_default_fields’,’dobeweb_remove_comment_fields’);