Don’t hesitate to contact us if you have any feedback.

Tag: Wordpress

  • WordPress – Enhance Gutenberg blocks with custom attributes using HTML API

    WordPress – Enhance Gutenberg blocks with custom attributes using HTML API

    Tailoring the Gutenberg editor’s blocks to meet your website’s specific needs is now more straightforward with WordPress’s HTML API. The following PHP code snippet demonstrates how to add custom classes and attributes to the content of native Gutenberg paragraph, list, and image blocks. The Code How It Enhances Your Blocks Benefits for Your WordPress Site

    Read more

  • WordPress – Add page specific body classes

    WordPress – Add page specific body classes

    In web design, CSS plays a crucial role in customizing the look and feel of individual pages. To give you more power over styling, the following PHP snippet allows you to dynamically add the page slug as a class to the <body> tag of each page on your WordPress site. The Code How It Functions

    Read more

  • WordPress – Remove auto p in excerpt

    WordPress – Remove auto p in excerpt

    WordPress automatically applies paragraph formatting to excerpts using the <p> tag, which can sometimes disrupt the desired layout or styling of your website. If you’re looking to have more control over how your excerpts are displayed, the following PHP code snippet allows you to remove WordPress’s default automatic paragraph tagging and gives you the option

    Read more

  • WordPress – Boost GraphQL query limits

    WordPress – Boost GraphQL query limits

    When working with GraphQL in WordPress, you might encounter limitations on the number of queries you can execute. By default, GraphQL imposes a cap to ensure performance and server health. However, there are scenarios where you need to increase this limit to accommodate larger data sets or complex queries. The following snippet of code allows

    Read more

  • WordPress – Handle theme.json RGB color transparency

    WordPress – Handle theme.json RGB color transparency

    WordPress’s theme.json has brought unparalleled ease to theme customization. However, the default color settings, which are typically in hexadecimal format, lack support for transparency. To enhance your theme’s color capabilities, we’ve developed a solution that introduces RGB color values with transparency. Find out how to do it with HSL here. The Code Our custom PHP

    Read more

  • WordPress – Handle theme.json HSL color transparency

    WordPress – Handle theme.json HSL color transparency

    WordPress’s full site editing capabilities have revolutionized theme customization, allowing for an extensive range of configurations through the theme.json file. However, one limitation has been the inability to handle color transparency effectively with traditional hexadecimal color codes. To address this, we’ve crafted a solution to enhance your theme’s color system. Find out how to do

    Read more

  • WordPress – How to remove default theme colors

    WordPress – How to remove default theme colors

    Crafting a unique look and feel for your WordPress site often involves overriding the default color palettes, gradients, and typography sizes that come with the core or themes. The following PHP code snippet is designed to help you start with a clean slate by removing these defaults. The Code This snippet should be added to

    Read more

  • WordPress – Enhance Rest API security with Nonce

    WordPress – Enhance Rest API security with Nonce

    The WordPress REST API opens up a world of possibilities for developers by allowing programmatic interaction with site data. However, with this power comes the need for heightened security to ensure that only authorized requests are processed. The following PHP snippet demonstrates how to secure REST API access using a nonce—a unique number used to

    Read more

  • WordPress – Remove sensitive Rest API Endpoints

    WordPress – Remove sensitive Rest API Endpoints

    WordPress’s REST API provides a flexible way to interact with your site’s data. However, there might be instances where certain endpoints can expose sensitive information or provide vectors for potential attacks. The following PHP snippet helps tighten security by removing specific endpoints from the WordPress REST API. The Code This snippet should be placed in

    Read more

  • WordPress – Alter query on archive page

    WordPress – Alter query on archive page

    When managing a content-rich WordPress website, you might encounter a need to tweak the main query on specific pages or archives, particularly when dealing with custom post types. The PHP snippet below offers a solution to alter the post query for custom post type archives to display all posts without pagination. The Code This code

    Read more