PHP errors when using search
-
I have been getting an error whenever a search is done on my WordPress/Divi website. The results are listed, but there is an error listed first:
WARNING: USE OF UNDEFINED CONSTANT THEMENAME – ASSUMED ‘THEMENAME‘ (THIS WILL THROW AN ERROR IN A FUTURE VERSION OF PHP) IN /path-to-the-theme/SEARCH.PHP ON LINE 17
Line 16-18 of the search.php file are as follows:
<header class=”page-header”>
<span class=”search-page-title”>
<?php printf( esc_html__( ‘Search Results for: %s’, themename ), ‘<span>’ . get_search_query() . ‘</span>’ ); ?></span>
</header><!– .page-header –>WordPress ver: 5.3.2
PHP ver: 7.3
Divi ver: 4.3.4 with a child themeHow do I fix this?
The page I need help with: [log in to see the link]
- The topic ‘PHP errors when using search’ is closed to new replies.