It looks like you or the contact form plugin are using an outdated function, ‘get_page_by_title’, which has been deprecated since WordPress version 6.2.0. As a result, you are receiving a PHP Deprecated warning message.
To resolve this issue, you can update your code by replacing the deprecated function with ‘WP_Query’. The ‘WP_Query’ function is the current method for retrieving pages by title in WordPress. Here’s how you can modify your code:
To fix the issue, you can modify your code as follows:
<?php
$args = array(
'title' => 'Verzoek wijzigen contactgegevens bestrijders',
'post_type' => 'page'
);
$query = new WP_Query( $args );
echo do_shortcode( '[contact-form-7 id="13223" title="Verzoek wijzigen contactgegevens bestrijders"]' );
?>
This code will retrieve the page with the title ‘Verzoek wijzigen contactgegevens bestrijders’ and display the contact form using the ‘do_shortcode’ function.
For further information on WP_Query, you can refer to the official WordPress documentation: https://developer.www.ads-software.com/reference/classes/wp_query/.
Additionally, since it is related to Contact Form 7, I recommend creating a support topic in the Contact Form 7 support forum here: https://www.ads-software.com/support/plugin/contact-form-7/#new-topic-0. They have a team of experts who can help you with any issues you’re experiencing.
Thanks!