Web Development & WordPress

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”
Web Development & WordPress

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”
Web Development & WordPress

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');

Web Development & WordPress

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”
Web Development & WordPress

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”
Web Development & WordPress

How to show Paypal Buy Now, Cart, Donate or Subscribe button in your wordpress website and Redirect to Paypal page after successful Contact form 7 submission

This is the way I added a Paypal button in a wordpress site and Redirect it to the Paypal Payment Page ( by auto clicking the paypal button) while the Contact Form 7 form mail sent/form submission.

Continue reading “How to show Paypal Buy Now, Cart, Donate or Subscribe button in your wordpress website and Redirect to Paypal page after successful Contact form 7 submission”
Web Development & WordPress

How to add logo, menu and Contact number in header using Block Editor or in wordpress twenty twentythree (2023) theme : 4 minute Video

In this 4 Minute small video I have tried to show how to customize the header section of WordPress website built with the Twenty Twentythree theme and block editor. If you are using wordpress block editor theme like 2023 theme, In this tutorial, we’ll walk you through the process of adding a logo, a navigation menu, and a contact number to the header.

Continue reading “How to add logo, menu and Contact number in header using Block Editor or in wordpress twenty twentythree (2023) theme : 4 minute Video”