Category: WordPress

  • Simple Plugin for a Shortcode

    Simple Plugin for a Shortcode

    Creating a plugin in WordPress to handle your custom shortcode is a great way to keep your functionality separate from your theme. This means you can switch themes without losing the shortcode functionality. Here’s a step-by-step guide to creating a simple WordPress plugin for your shortcode: Step 1: Create the Plugin Folder and File First,…

  • WSL and WPCS in PHPStorm

    WSL and WPCS in PHPStorm

    To install the WordPress Coding Standards (WPCS) for PHP_CodeSniffer in PhpStorm when using Windows Subsystem for Linux (WSL), you’ll essentially be working through WSL for most of the setup.

  • ACF Repeater Fields

    ACF Repeater Fields

    Getting values from a repeater field in Advanced Custom Fields (ACF) is pretty straightforward. ACF repeater fields are super handy for creating sets of repeatable data, like a list of team members, event schedules, or image galleries.

  • wp_kses_post

    wp_kses_post

    The wp_kses_post() function in WordPress allows through the HTML elements that are specified in the $allowedposttags global variable.

  • ACF Color Picker Custom Pallets 🎨

    ACF Color Picker Custom Pallets 🎨

    So you need to add a custom pallet to the ACF color picker to match the branding of the site. Use an ACF hook in functions to put JS into the footer of the edit page, use a ACF JS filter to add the arguments.

  • Normal, Wide, and Full Margins Strategy

    Normal, Wide, and Full Margins Strategy

    Developing a CSS strategy to accommodate different block types in WordPress, especially for normal, wide, and full-width blocks, requires a combination of responsive design principles and a clear understanding of your theme’s layout constraints.

  • Take from the parent 🦹🏻

    Take from the parent 🦹🏻

    You can retrieve a field value from a parent post in WordPress. This is a common task in WordPress development, especially when working with hierarchical post types like pages.

  • Add a class to the post_class()

    Add a class to the post_class()

    In WordPress, you can definitely tack on extra classes to the post_class() function right in your template files. It’s super handy for styling your posts differently or adding some JavaScript functionality later on.

  • Add ACF Value to Custom Post Type WP Admin List

    Add ACF Value to Custom Post Type WP Admin List

    Displaying the value of an Advanced Custom Fields (ACF) field in the WordPress admin post list can be really handy for quick overviews. You can do this by using the manage_posts_columns and manage_posts_custom_column hooks for posts or custom post types.

  • meta_query

    meta_query

    The meta_query is a parameter in WordPress that is used to filter posts or custom post types based on the values of their custom fields. It is a sub-parameter of the WP_Query class and…