Footer
Footer
If you write something in the form of the control panel, for exemple "So Long, and Thanks for All the Fish" this text is attached to the wp_footer hook, so if you are stiling a nice big footer it's not the best scenario, all scripts should run just before the </body> to prevents render blocking. Would it be appropriate to separate the variable for the footer from the hooks?
Re: Footer
Sorry, what are you trying to achieve?vodka wrote: โSat Jun 06, 2020 9:36 am If you write something in the form of the control panel, for exemple "So Long, and Thanks for All the Fish" this text is attached to the wp_footer hook, so if you are stiling a nice big footer it's not the best scenario, all scripts should run just before the </body> to prevents render blocking. Would it be appropriate to separate the variable for the footer from the hooks?
Re: Footer
This is a starting setup:
In this case you have the var $flatpress.footer rendered inside and outside the footer tag, I thinks because {action hook=wp_footer} is faulty.
You can delete the line with {$flatpress.footer} in your theme, and use only {action hook=wp_footer} to display the footer message, but the whole script section is moved inside your div (and I want to avoid this).
Code: Select all
...
<!-- Footer -->
<footer>
...
some fancy code
...
{$flatpress.footer}
</footer>
{action hook=wp_footer}
</body>
</html>
You can delete the line with {$flatpress.footer} in your theme, and use only {action hook=wp_footer} to display the footer message, but the whole script section is moved inside your div (and I want to avoid this).
Re: Footer
Sorry, I'd love to help, but I don't know what exactly you're trying to get help with.
Re: Footer
Hi Tongara, sorry for my bad english, but my effort is a sort of bug report.
This is footer.tpl from leggero theme, and it's wrong for me:
..because the footer variable is rendered with {action hook=wp_footer} and not {$flatpress.footer}.
The right version is:
But in this case the var is diplayed 2 times, so I think there is something to fix in the php code.
This is footer.tpl from leggero theme, and it's wrong for me:
Code: Select all
</div>
<div id="footer">
{action hook=wp_footer}
<!--
Even though your not required to do this, we'd appreciate
a lot if you didn't remove the notice above.
This way we'll get a better ranking on search engines
and you'll spread the FlatPress word all around the world :)
If you really want to remove it, you may want to
consider doing at least a small donation.
-->
<p>
This blog is proudly powered by <a href="http://www.flatpress.org/">FlatPress</a>.
</p>
</div> <!-- end of #footer -->
</div>
</body>
</html>
The right version is:
Code: Select all
</div>
<div id="footer">
{$flatpress.footer}
<!--
Even though your not required to do this, we'd appreciate
a lot if you didn't remove the notice above.
This way we'll get a better ranking on search engines
and you'll spread the FlatPress word all around the world :)
If you really want to remove it, you may want to
consider doing at least a small donation.
-->
<p>
This blog is proudly powered by <a href="http://www.flatpress.org/">FlatPress</a>.
</p>
</div> <!-- end of #footer -->
</div>
{action hook=wp_footer}
</body>
</html>
Re: Footer
Hi,
core.theme.php does exactly what you experience - by design. It adds theme_wp_footer() to the footer hook which simply echoes the footer value from the config:
Unfortunately, I do not understand the problem with that yet - do you want to add own functions to the footer hook and get in trouble with the existing one?
Arvid
core.theme.php does exactly what you experience - by design. It adds theme_wp_footer() to the footer hook which simply echoes the footer value from the config:
Code: Select all
function theme_wp_footer() {
global $fp_config;
echo $fp_config ['general'] ['footer'];
}
add_action('wp_footer', 'theme_wp_footer');
Arvid
Who is online
Users browsing this forum: No registered users and 57 guests