Tag: wordpress
-
Prevent stylesheet from being cached
—
in WordpressTo prevent a stylesheet from caching in WordPress using PHP, you can add a query string to the stylesheet URL in your theme’s functions.php file. For example, use wp_enqueue_style( ‘your-style-handle’, get_stylesheet_uri(), array(), time() ); to append the current timestamp, ensuring the browser fetches the latest version on each page load
-
Meta Field Block plugin – Display custom fields as a block
—
in GeneralDisplay a custom field as a block on the front end. It supports custom fields for posts, terms, and users. It supports ACF fields explicitly.
-
How to use PHP templates in block themes
—
in WordpressIf WordPress can not find a matching .html file, it tries to find a .php version of that file. I will give you an example of a PHP template for a block theme that uses the header and footer template parts and also displays the blocks from the page content.