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 …
Category: Tricks
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. …
Change the Ownership of Your Files/folder
Change the folder’s ownership from root to www chown -R www:root /homes/roots/www.dobeweb.com
[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 …
[fixed] Update to WordPress 4.4 – SERVER ERROR 500
It seems that the recent WordPress 4.4 update got error when you update your script automatically. When the WordPress updated, you will get blank page, and get the message: SERVER ERROR 500 And it is simple to fix this problem, just open your site with another browser, then you will get the following page: Database …
Fix WordPress “You do not have sufficient permissions to access this page”
If you use Nginx and meet this problem with some WordPress plugin tab error “You do not have sufficient permissions to access this page”, please read this post, it’s easy to solve. You need to edit the WordPress core file: Go –> wp-admin –> options-general.php Open options-general.php, add the following code before the <php <base …
WordPress Responsive Captions & Images
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, …
WordPress: How to Fix the Problem with Image Captions after 3.7 Upgrade
If you have upgraded to the latest WordPress v3.7, you may meet the image caption problem in the visual editor, this is a particularly nasty bug that affects working with image captions in the visual editor. It was caused by a regression in Uglify.js. New captioned image inserted into the Visual Editor produces a huge …
How to Add “nofollow” to WordPress Menu Links
The “nofollow” plays a very important role in the “SEO”, some of you may don’t know how to add “nofollow” to the WordPress menu links, some of you may don’t use the WordPress menu, however, for most of us now use WordPress menu, in this tutorial, I will show you a very simple and easy …
WordPress Use Google Custom Search Without Plugins
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 …
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 …
Insert Ads In The Post Content After 1st Paragraph in WordPress
How to Insert Ads In your Post Content After 1st Paragraph in WordPress There are many ways to insert adsense or other advertisement in your WordPress post/page content, you can insert it before the content or after the content, but how to insert your ad in the post? I mean after the first paragraph, or …
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’);
How to Use TimThumb with WordPress Featured Images
The TimThumb is one of the most popular resizing web images script, a lot WordPress themes use this simple easy tool to crop the images, especially the WordPress magazine themes. Usually, a lot WordPress theme use TimThumb resizing the first images in the post, however, with the developing of the WordPress, a featured images feature …
Load Javascript Last – Load JavaScript After Pageload Make Site Faster
Tips on how to load Javascript (advertisement) last after your page loaded, this can help you load your site faster especially you have a lot out site JavaScript. The most common reason that websites don’t rank good in popular web sites is slower loading time. Often excessive JavaScript on your page is the main reason …