Blog

Preventing Past Dates jQuery

User jQuery('#start_date_time,#end_date_time').datetimepicker({ format: 'd-m-Y H:i', }); prevent old dates Assistant To prevent users from selecting past dates in your jQuery datetimepicker, you can set the `minDate` option to the current date and time. Here’s how you can modify your existing code: jQuery('#start_date_time, #end_date_time').datetimepicker({ format: 'd-m-Y H:i', minDate: 0, // Prevents selection of past dates }); […]

Gutenberg Block Live Reloading

User { "name": "nt-block", "version": "0.1.0", "description": "Example block scaffolded with Create Block tool.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", "main": "build/index.js", "scripts": { "build": "wp-scripts build –webpack-copy-php", "format": "wp-scripts format", "lint:css": "wp-scripts lint-style", "lint:js": "wp-scripts lint-js", "packages-update": "wp-scripts packages-update", "plugin-zip": "wp-scripts plugin-zip", "start": "wp-scripts start –webpack-copy-php" }, "devDependencies": { "@wordpress/scripts": "^30.4.0" }, "dependencies": { […]

Remove defaultProps Warning

User Warning: _o: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead. in wp block custom blocks Assistant The warning you're seeing indicates that the usage of `defaultProps` in function components will be deprecated in a future version of React. Instead of defining default properties […]

Child Theme Sage 10

User create child theme of root sage 10 Assistant Creating a child theme for Sage 10 (a WordPress starter theme by Roots) allows you to customize your site without modifying the parent theme directly. Here’s how you can create a child theme for Sage 10: ### Step 1: Create the Child Theme Directory 1. **Navigate […]

Fix jQuery Not Defined

User root sage theme 10 jquery not defined wordpress 6.6.2 Assistant If you're encountering a "jQuery not defined" error while using the Sage theme (version 10) with WordPress 6.6.2, it’s likely due to how jQuery is being enqueued or loaded in your theme. Sage 10 uses a modern JavaScript setup with ES6, and it doesn't […]

Using Sans in Tailwind

User root sage theme tailwind config module.exports = { content: ['./index.php', './app/**/*.php', './resources/**/*.{php,vue,js}'], theme: { extend: { colors: {}, + fontFamily: { + sans: 'Public Sans, sans-serif', + }, }, }, plugins: [], }; how to use sans in theme files Assistant To use the custom `sans` font family defined in your Tailwind CSS configuration […]

Add Plugin in Bedrock

User add new plugin in bedrock composer Assistant To add a new plugin to your Bedrock-based WordPress project using Composer, follow these steps: 1. **Navigate to your Bedrock project directory**: Open your terminal and change to your Bedrock project directory. cd path/to/your/bedrock 2. **Require the plugin via Composer**: Use the `composer require` command to add […]

Essential WordPress Plugins

User wordpress required plugins Assistant The required plugins for a WordPress site can vary based on its purpose, but here are some essential plugins that most WordPress installations can benefit from: 1. **Yoast SEO** or **All in One SEO Pack**: Helps optimize your site for search engines with features like meta tags, sitemaps, and content […]

Bud Not Found Error

User yarn run build yarn run v1.22.22 $ bud build /bin/sh: bud: not found error Command failed with exit code 127. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. in php container docker Assistant The error message indicates that the command `bud` is not found in your PHP Docker container. This usually means that Bud […]

Nginx WordPress Redirection Fix

User version: '3.8' networks: wpbedrock: driver: bridge services: # Nginx Service nginx: image: nginx:stable-alpine container_name: ${APP_NAME}_nginx ports: – "2500:80" links: – php volumes: – ./bedrock:/var/www/html – ./docker/nginx/site.conf:/etc/nginx/conf.d/default.conf:rw – ./docker/logs/nginx:/var/logs/nginx:rw depends_on: – php – mysql networks: – wpbedrock # PHP Service php: build: context: . dockerfile: Dockerfile container_name: ${APP_NAME}_php volumes: – ./bedrock:/var/www/html # Fixed typo in […]