I have found the error.
In the header.php an undefined constant was tried to be accessed. So instead of the following wrong code:
<?php if ($pagetitle == pagetitle_1){
$pt1 = "pagetitle_1";
$main = "main_1";
} else {
$pt1 = "";
}
?>
I had to add the quotation marks to pagetitle:
<?php if ($pagetitle == "pagetitle_1"){
$pt1 = "pagetitle_1";
$main = "main_1";
} else {
$pt1 = "";
}
?>
Related Posts:
- PHP unit testing WordPress?
- Proper use of Output Buffer
- Include a external PHP file into a WordPress Custom Template
- List of all theme customizer control types?
- Is having multiple theme customizers for different pages possible?
- How to remove hardcoded characters from playlists?
- function_exists call in function.php
- Debugging an error: wp_enqueue_style was called incorrectly
- Hide a menu-item and its submenus and display a ‘Log in’ link if the user is logged out
- The best way to customize “nav-menu-template.php” to add if the ‘link_before’ is “checkbox”
- Multiple do_shortcode($content) within one shortcode
- Remove css styles from specific page
- PHP Customization: Taxonomies and Queries, why? [closed]
- Widgets not showing in my custom theme
- Switching between custom templates in a post type of the admin menu
- What is the fastest way to load PHP functions that are only used in one theme template?
- My Own layout in WooCommerce pages [closed]
- Differences when using the the_time and the_date functions
- How do I access the media settings
- Can’t load WP function into external function
- Custom category code not showing all posts
- Implement toggle switch for theme options in settings API
- How can i upload images in an admin page?
- Theme Options Page – User Updates Logo
- Wp-login appears White Screen, Error: Cannot modify header information
- Can’t access variable outside for loop
- add custom link to wordpress media gallery modal
- Need Help Fixing My Iframes [closed]
- Two queries for a WP_User_Query search work perfectly apart, but not together
- How to edit widget code to add unique class name to each div?
- Compare the old get_theme_mod($name) to the new get_theme_mod($name) return value
- How do I link a button I created in theme customizer to a function?
- can i fetch a custom metabox data in another page or post type?
- Is the “_s” on this `sprintf(__(‘Page %s’, ‘_s’), max($paged, $page))` just refer to a text domain?
- ‘Post-thumbnails’ feature does not seem to register
- WordPress admin-ajax.php
- How to obtain the current website URL in my theme?
- Syntax error when I try to insert my loop into an unordered list? [closed]
- What exactly do this function declared into functions.php file of a WP theme?
- Admin ToolBar not being displayed at top of site
- Royalty-Free Sliders used in theme development
- Reason to add a name of the theme like (‘menu-1’ => __( ‘Primary’, ‘twentynineteen’ ),) in PHP?
- Separation of presentation and code – WordPress
- Search form does not work in my website
- zip unzip attachments in wordpress
- get_template_directory adding FTP root folders in urls
- WordPress get_media_embedded
- Live to Local on MAMP, not working, outputting functions.php code
- Help Fallback (thumbnail)
- How to Update an old theme for the latest wordpress version
- Adding Updated Post Date PHP Custom Theme
- get_comments_number() returns 0
- get_page_templates only return templates with “home” in the filename
- Search only working on front page (index) , not working on other pages
- Show different website layout if no sidebar added
- Why the dynamic_sidebar() call is putted into an ul tag?
- How to make sure relative URL works when site is not on root domain?
- Toolbar Hidden in a Virtual Page
- Remove Custom Post Category In WordPress Slug Using .Htaccess
- How do you remove header sitewide from mobile only?
- Uncaught TypeError: extract(): Argument #1 ($array) must be of type array, null given
- How do I edit the terms output args or array data?
- Header is not displaying on certain pages of wordpress theme [closed]
- When I click for the redirect link it is showing the content of index.php instead of single_assignment_page.php
- How can I prevent a shortcode div from extending beyond its boundaries?
- Looping through dummy posts and showing them in the main index.php
- Should I set a page as “No-index” if I include it’s content within the front-Page.php via this method?
- Trying to get pagination working on WP_Query() post grid
- Warning: count(): syntax problem of the count () function
- WordPress child theme, creating a custom php template page
- Menu to the right of screen on desktop using Bootstrap 4
- Custom theme admin-ajax.php 400 (Bad Request)
- Customizer: How to Sanitize a Decimal Number Range
- PHP code printed into CSS classes
- How to send Ajax Call from frontend without using wp_localize_script in Theme
- Get the image title and alt from custom query
- Add Text Area To Child Theme’s Home Page
- What syntax is this? “{{post.price}}”
- How to add thumbnails from recent posts to owl-carousel in wordpress automatically?
- Custom theme: adding unwanted tags in the content
- Relative post date in recent posts list
- WordPress get_post_meta issue
- How to correctly add the featured immage (thumbnails) support in a WP theme? Why I can’t add a featured immage?
- append links with unique number string
- How to add button to top of theme customizer?
- Adding Media button to only pages
- Sidebar doesnt get updated?
- How to implement conditional PHP in Footer
- Adding php within a return statement [closed]
- ACF | WooCommerce | Theme Development | How to include a /template-part/ that makes use of ACF’s on a custom WooCommerce homepage?
- Predefine Magazine Style Layouts
- Twig+WordPress how to use array arguments inside a function?
- Pagination not working properly
- How can I fix my pagination?
- How to store the_post_thumbnail() value in a variable
- How to hide header and footer from page template
- How to customize content-video.php file in wordpress as is in html file?
- Woocommerce Convert existing order to the cart
- WordPress PHP8 Critical Error in class-wp-widget.php
- Adding features to Gutenberg without theme.json