How to use multiple custom post types to archive as front page?

Well, looks like you’ve almost got it. To include multiple custom post types in the WP_Query object, just change: $query->set( ‘post_type’, array( ‘recipes’ ) ); to: $query->set( ‘post_type’, array( ‘recipes’, ‘another-custom-post-type’ ) ); Basically adding more elements to the array. So the final code becomes: function blestrecipes_cpt_filter( $query ) { if ( ! is_admin() && … Read more

WordPress 6.1.1 shows deprecated errors with PHP 8.1 & 8.2

This is not actually an error, rather a deprecation notice. Which means, future versions of PHP will remove some old language features, so the developers should be aware of it. Info. for WordPress: WordPress developers are well aware of it and future versions of WordPress will be changed and this deprecation notice will no longer … Read more

Adding date and time to the same request

If you’re trying to get an ISO8601-formatted datetime, you can just use get_the_date() as it’ll actually return the date and time a post was published. So something like get_the_date( ‘c’ ) should get you the date and time, formatted how you want them (per your comment).

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)