Is there any way to get around with this? I know I won’t be allowed to modify the plugin though. Or if I could communicate with the plugin developer what should I ask to him/her?
]]>I’m struggling with getting my template to work with the twenty-twenty-three block theme. get_header(); and get_footer(); are defaulting to theme-compat templates. I’ve tried get_template_part( ‘header’, ‘twentytwentythree’ ); and get_template_part( ‘footer’, ‘twentytwentythree’ ); as well as get_template();.
I’m looking for my plugin to work out of the box, at least with the default WordPress block themes as well as non-block themes and I can’t find any documentation for guidance. The idea is that a user should just be able to activate the plugin and start creating staff. Site visitors will see dedicated staff pages that inherit the same wrapper structure (header, footer, etc.) as the rest of the site. I would very much appreciate any help.
]]>get_header() function doesn't inject the
header.phpcode, while
get_footer()` works fine.header.php
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<?php
wp_head();
?>
</head>
<body>
<header>
header
</header>
front-page.php
<?php
get_header();
?>
front page content
<?php
get_footer();
?>
footer.php
<?php
wp_footer();
?>
<footer>
footer
</footer>
</body>
</html>
The odd part is that when creating a new header-a.php
file , with the exact same code as header.php
I can load it using get_header('a')
and it works fine;
Any idea why it happens and how to fix it?
Thanks.
When we need to insert Rich Snippets, we usually create 1) page-foo.php
and 2) header-foo.php
so that when page-foo.php loads, it doesn’t include the get_header(), it includes the get_header('foo')
.
Is your plugin capable of inserting stuff into <head> of the selected posts and pages?
Thank you in advance,
Hypnotherapy Belgrade and PEAT center
I want to set a specific header for my blog posts that contain an image defined by the blog post title. For example:
Blog Post 1
Includes header for BLOGS ONLY
Includes Blog-Post-1.jpg within the header
Blog Post 2
Includes header for BLOGS ONLY
Includes Blog-Post-2.jpg within the header
–
I also want my pages, such as About.php to have their own seperate header. This header can match the front-page.php header, which is currently set to header.php
Is this possible?
Sorry if this is a really beginner question.
]]>I need to display my theme’s top menu (header) on every single portfolio item page, above the navigation bar, just like it happens on the main page (header/footer are being correctly displayed there). I know this is usually achieved by calling get_header()
, and this theme is no different. I also know that the navigation bar is being built in scripts.js
, but I don’t think it is correct to call get_header()
from there. How can I do it?
Sidenotes:
1. Similarly, I needed to display the theme’s footer on single portfolio item pages, and I managed to do it by simply calling get_footer()
on content-sharing-portfolio.php
, but with the header, it seems it isn’t that simple.
2. I don’t know if this is important, but the theme I’m using/modifying is Frost.
[25-Oct-2016 23:15:38 UTC] PHP Fatal error: Call to undefined function get_header() in /home/mysite/public_html/site/wp-content/themes/sitetheme/index.php on line 1
Here’s the code on that page:
<?php get_header(); ?>
<div id="primary" role="main">
<?php while ( have_posts() ) : the_post(); ?>
<h1 class="title"><?php the_title(); ?></h1>
<div class="entry-content">
<?php the_content(); ?>
<?php wp_link_pages(array('before' => '<p><strong>'.__('Pages:', 'framework').'</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
<!--END .entry-content -->
</div>
<?php endwhile; // end of the loop. ?>
</div><!-- #content -->
<?php get_footer(); ?>
Any ideas?
]]>This has happened several times over 2 months now.
Every now and then I get this error message in our apache2/log/error.log file.
The strange thing is that the ip causing this issue always seems to come from foreign countries (Romaina, Russia and other countries that are not related to our business).
After getting the error message above the mysql server seems to shut down and I have to manually go in and start it for the website to work again.
1. Does anyone else have the same issue?
2. Is there any way to block these kind of events?
Fatal error: Call to undefined function get_header() in C:\AppServ\www\Comuniland\wp-content\themes\beatstone\index.php on line 15
I′ve seen a lot of information about this error in your forums and some more on the internet, but not enought to fix my problem.
The most usefull solution is about to replace the new index.php. But after i tried that and some more nothing happened, just more errors indeed.
Need some help please.
Thanks all!
]]>Installation is successful, all the files are unzipped in the right folder but when i try to open the page, it not recognizing any other methods in the directory. I am getting the following error :
Call to undefined function get_header() in /home/a564310/public_html/test/wp/index.php on line 1
Please help
]]>