WordPress theme requires PHP v >=8.1 – How to a dd different PHP version to docker-composer

Adjusting the wordpress image to the below works wordpress:6.3.1-php8.1-apache Full docker-compose.yml file # version: ‘3.1’ services: db: image: mysql:8 container_name: mysql_WP restart: always command: “–default-authentication-plugin=mysql_native_password” environment: MYSQL_ROOT_PASSWORD: password MYSQL_DATABASE: dbname MYSQL_USER: user MYSQL_PASSWORD: password # volumes: # – ./schema:/docker-entrypoint-initdb.d phpmyadmin: image: phpmyadmin/phpmyadmin restart: always ports: – 8082:80 environment: PMA_HOST: db MYSQL_ROOT_PASSWORT: password wordpress: image: wordpress:6.3.1-php8.1-apache … Read more

How to temporarily set the featured image for a post when the post is loaded

The post_thumbnail_html action hook will be the one you’re looking for. This allows you to add conditional logic to change the source url depending on the page you’re looking at. function new_post_thumbnail_html( $html, $post_id, $post_thumbnail_id, $size, $attr ) { $new_html = $html; if ( is_archive() ) : $new_html=”<img src=”https://your-image-source.com” alt=”Your image alt tag”>”; endif; return … Read more

Call to undefined function create_function() – PHP 8.2

You are going to want to edit this line: add_action( ‘plugins_loaded’, create_function( ”, ‘global $BBCode; $BBCode = new BBCode();’ ) ); You will want to make yourself an actual function. Probably something like this: function my_hacked_function(){ global $BBCode; $BBCode = new BBCode(); } add_action( ‘plugins_loaded’, ‘my_hacked_function’); I’ve not tested this. However, this is the general … Read more