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”
Vedic Astrology Insights

Mercury in 8th house Precautions

** This contents are collected from my Guru’s (Deepanshu Giri) facebook page Lunarastro . The post is written by Nitin Bhatt . So these contents are for learning and research purpose only. I will gradually Update it.

As we know in astrology Mercury is communication and 8th house is Death. So Mercury in 8th  is the bearer of the bad news. Native may have committed sin of giving someone bad news just for joke, as 8th house is death, breaks and mercury represents communication, humour, so in this life also native will get habit of uncontrollable laugh, miscommunication at wrong time and even speaking Ill of the dead. 

That is why writing obituary for ancestors and write  and communicate good things about them will ward off negative energy of the Mercury in the 8th house. 

Also Mercury in 8th house shows incomplete rituals of death in family.

Vedic Astrology Insights

Moon in 2nd House

** This contents are collected from my Guru’s (Deepanshu Giri) facebook page Lunarastro and also from Saptarshi Astrology of Respected Sunil John Sir. So these contents are for learning and research purpose only. I will gradually Update it.

  1. People with the moon in the 2nd house, or cancer in the 2nd house, shows that family members, close relatives like brothers, sisters, grandparents, uncles, and aunts all these people used to take advantage of these natives throughout life. People used to play with their emotions and innocent nature. Please do not allow anyone to play with your emotions because it disturbs your peace of mind.
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”