Skip to main content

Posts

Prevent Spam Emails in Contact form 7 wordpress

 Prevent or Stop Spam Emails in Contact form 7   If you're receiving spam emails through your Contact Form 7 (CF7) in WordPress, here are some effective ways to prevent them: 1. Use reCAPTCHA (Recommended)   2. Use Akismet Plugin   3. Enable a Honeypot Field using Plugin( Install and activate Contact Form 7 Honeypot plugin) 4. Custom Code (Best) So this tutorial will not cover 1-3 points because that is self explained in the heading . lets try 4th method, how to stop spam emails and block email in wordpress contact form 7 forms. we can use same method in any plugin or custom website. First we need to add an hidden field in our cf7 form. Add below code in your contact form [hidden trap-field class:spam-check]    and this code you can add in contact form 7 <script>   document.addEventListener("DOMContentLoaded", function() {       document.querySelectorAll(".spam-check").forEach(field => {     ...
Recent posts

Shopify show related product with count validation and meta value

  Go to theme and add custom liquid block where you want to show related products and also mention meta field value that you want to show instead of product title {% assign related_products = product.metafields.custom.related_products.value %} {% if related_products and related_products != blank %} <div class="related-products">   <h3>Related Products</h3>   <div class="related-products-list">     {% for recommended in related_products %}     <div class="related-product">       <a href="{{ recommended.url }}" class="related-product-link">         <div class="related-product-image">           {% if recommended.featured_image %}             <img src="{{ recommended.featured_image.src | img_url: 'medium' }}" alt="{{ recommended.title }}"> ...

Integrate firebase database with laravel and save functionality

 How to Integrate firebase database with laravel and save functionality In this tutorial, we will use default firebase database so first login to google console and go to project settings -> service account adn click on generate new private key and download it and put it in root folder of laravel app 1) Install Google Cloud Firestore via Composer: composer require google/cloud-firestore 2) Add Firebase Credentials to .env file: Ensure you have added the following in your .env file: FIREBASE_CREDENTIALS=./firebase_credentials.json FIREBASE_PROJECT_ID=mydb 3) Create a Firestore Service Provider: You need to create a service provider to configure Firestore in your Laravel app. Run the following command to generate a service provider: php artisan make:provider FirestoreServiceProvider 4) Configure Firestore in the Service Provider: Open the newly created FirestoreServiceProvider.php file and configure Firestore: <?php namespace App\Providers; use Google\Cloud\Firestore\Fi...