WordPress Tricks

Resolving WP Touch Pro Mobile View Conflict with W3 Total Cache: Fixing Desktop Cache Display Issue

If you are using both the W3 Total Cache and WP Touch Pro plugins for optimizing your site’s performance and mobile view respectively, you may encounter a conflict where WP Touch Pro stops displaying the mobile view and instead shows the cached desktop version.

Here is the Solution

Continue reading “Resolving WP Touch Pro Mobile View Conflict with W3 Total Cache: Fixing Desktop Cache Display Issue”
WordPress Tricks

WordPress free theme for cooking or gardening or healthy living : Modification and Make your site live

Sapor is a free wordpress theme which you can use for your cooking or gardening or healthy living blog site. Here I am sharing you css customization which you can use to customize or style it if you want to use the theme.

Download Sapor Theme

Sapor Theme Demo to get idea how it looks

Continue reading “WordPress free theme for cooking or gardening or healthy living : Modification and Make your site live”
WordPress Tricks

Add additional font size in WordPress Visual Editor ( Tiny MCE Editor)

The Default font which shows in Visual Editor font size dropdown is 8px 10px 12px 14px 16px 20px 24px 28px 32px 36px 48px 60px 72px 96px.

Continue reading “Add additional font size in WordPress Visual Editor ( Tiny MCE Editor)”
WordPress Tricks

Theme Baker by Automattic : Show your Short Bio and social links in homepage: 4 min video to create such page.

Baker is a wordpress theme, designed for single-page websites by Automattic. The single post and page layouts of this theme have no header, navigation menus, or widgets, so the way you design the page in the WordPress editor, you will just see the same page on the front end.

Here I am sharing you a 4 min video how to create such page using wordpress Gutenberg editor.

Download the Theme

Baker is a child theme of Seedlet theme. If you want to use Baker  in your self-hosted site, download and install both themes from the links below, and activate Baker: Also please watch the 4min video to setup

Download Baker Theme

Download Seedlet

Continue reading “Theme Baker by Automattic : Show your Short Bio and social links in homepage: 4 min video to create such page.”
WordPress Tricks

New User Registration with image upload Facility : WordPress

Here I am sharing you template file and the related functions.php file code to register a wordpress user ( user role is Editor)

The template is doing the following to register a new wordpress user

  1. Upload image
  2. Send mail to Admin and Registered user both after successful registration
  3. Saving the profile or uploaded image in /wp-content/uploads/USER_ID
  4. Redirect to a url ( slug is used in the code) after successful registration
Continue reading “New User Registration with image upload Facility : WordPress”
WordPress Tricks

Author ( user role ) can only see his own uploaded images without making advance custom fields hidden

Generally , due to this code $wp_query->set(‘author’, $current_user->ID); the custom fields of Advanced Custom Fields ( acf ) got hidden. So i have used this following code to solve the issue. So if you use this code in function.php or using code snippet plugins, Author can see only his uploaded images instead of all users image.

 function restrict_author_media_library($wp_query) {
    if (  $wp_query->get('post_type') == 'attachment' && current_user_can('author')) {
        $current_user = wp_get_current_user();
        $wp_query->set('author', $current_user->ID);
    }
}

add_action('pre_get_posts', 'restrict_author_media_library');

WordPress Tricks

Based on User Role ( subscriber , editor) redirect to different url or login page During Logout action

If you want your Client ( user role created) or Editors to be redirected to different urls while they logout, use the code i shared below. Just change the urls in the code and paste it in your child theme’s function.php or use Code Snippet Plugins.

Continue reading “Based on User Role ( subscriber , editor) redirect to different url or login page During Logout action”
WordPress Tricks

ACF post object drop down value auto populate or selected based on other field value

In the screenshot you can see the Post Object in ACF and Field Name is “region_id”.

That drop down ( Region) I have to auto select or populate based on other field ( Country) .

Continue reading “ACF post object drop down value auto populate or selected based on other field value”
WordPress Tricks

Show Specific Post Content into a page or sidebar using Shortcode and Post ID

Suppose you want to show specific post content into your homepage or any other page or in sidebar using shortcode, using the code i shared below you can do it. The shortcode works like this [copy_post_content id=”YOUR POST ID”].

Continue reading “Show Specific Post Content into a page or sidebar using Shortcode and Post ID”