Month: January 2025

Scroll Image Update Logic

User document.addEventListener('DOMContentLoaded', function () { const items = document.querySelectorAll('.post-scroll-item'); const images = document.querySelectorAll('.post-scroll-image img'); const contentContainer = document.querySelector('.post-scroll-content'); // Update image on scroll contentContainer.addEventListener('scroll', function () { const scrollTop = contentContainer.scrollTop; items.forEach((item, index) => { const itemTop = item.offsetTop – contentContainer.offsetTop; const itemBottom = itemTop + item.offsetHeight; if ( scrollTop >= itemTop – contentContainer.clientHeight / […]

Google Reviews API PHP

User google reviews api custom php Assistant To implement a Google Reviews API integration in custom PHP, you'll need to use the **Google Places API** from the Google Cloud Platform. Here's a step-by-step guide to help you fetch and display Google reviews: — ### **Step 1: Enable the Google Places API** 1. Go to the […]

Check WordPress Cron Job

User function all4cloud_register_personio_cron_job() { // if (!wp_next_scheduled('personio_fetch_jobs')) { wp_schedule_event(time(), 'hourly', 'personio_fetch_jobs'); // } } add_action('wp', 'all4cloud_register_personio_cron_job'); add_action( 'personio_fetch_jobs', 'all4cloud_personio_fetch_jobs' ); function all4cloud_personio_fetch_jobs() { } how to check above is run or not Assistant To verify whether your custom WordPress cron job is running, you can follow these steps: ### 1. **Check if the Cron Job […]

Hourly Event Scheduling WordPress

User create schedule event hourly wordpress Assistant To create an hourly schedule event in WordPress, you can use the `wp_schedule_event()` function. Here's a step-by-step guide: — ### 1. Register the Hourly Schedule Event Add the following code to your theme's `functions.php` file or a custom plugin: // Register custom cron schedule if not already registered […]

Check WordPress Cron Job

User function all4cloud_register_personio_cron_job() { // if (!wp_next_scheduled('personio_fetch_jobs')) { wp_schedule_event(time(), 'hourly', 'all4cloud_personio_fetch_jobs'); // } } how to check above cron is working or not Assistant To check if the WordPress cron job (`all4cloud_personio_fetch_jobs`) is working, you can follow these steps: — ### 1. **Verify Scheduled Events** You can use the WP CLI or plugins to confirm […]

Elementor Header Error Fix

User Elemenskits header causing elementor normal header template gives error the_content not found Assistant The error "the_content not found" in Elementor when using the Elemenskits header can occur for several reasons. Here are some steps you can take to troubleshoot and resolve the issue: 1. **Check Compatibility**: Ensure that your Elementor version and Elemenskits plugin […]

Fixing Mixed Content Error

User Mixed Content: The page at 'https://shareyourthoughts.ddev.site/' was loaded over HTTPS, but requested an insecure script 'http://0.0.0.0:5173/@vite/client'. This request has been blocked; the content must be served over HTTPS. ddev ssh laravel vue give above error Assistant The error occurs because your development environment is trying to load resources (in this case, Vite's client script) […]

Vite HTTPS HMR Issue

User import { defineConfig } from 'vite'; import laravel from 'laravel-vite-plugin'; import vue from '@vitejs/plugin-vue'; export default defineConfig({ plugins: [ laravel({ input: ['resources/js/app.js', 'resources/js/app-backend.js'], refresh: true, }), vue({ template: { transformAssetUrls: { base: null, includeAbsolute: false, }, }, }), ], server: { host: '0.0.0.0', // Allows access from the Docker container port: 5173, // Port […]

Scroll event on resize

User jQuery(document).ready(function ($) { let lastScrollTop = 0; $(window).scroll(function () { const currentScroll = $(this).scrollTop(); const header1 = document.querySelector(".main-header"); // Replace with Header 1 class or ID const header2 = document.querySelector(".sticky-header"); // Replace with Header 2 class or ID if (currentScroll > lastScrollTop) { // alert($(this).scrollTop()); header1.style.display = "none"; header2.style.display = "flex"; header2.style.opacity = "1"; […]

Yarn run dev issue

User laravel vite vue ddev setup yarn run dev not working port 5173 Assistant It seems like you are facing an issue where `yarn run dev` isn't working in your Laravel + Vite + Vue.js setup with DDEV, particularly related to port 5173. Here's a step-by-step guide to help you resolve the issue: 1. **Check […]