admin管理员组文章数量:1314216
As of version 5.5.0, WordPress introduced second argument (array $args) to get_header.
I am calling get_header in my templates including index.php and I want to pass meta description value from template to header.php
And I am trying this
$args = array('Index meta desc');
get_header(null, $args);
While in header.php file the value of $args is an empty array.
Not sure, if I am calling the variable correctly.
Any comment/answer will be helpful.
Thank you.
本文标签: How can I pass a variable from a template to headerphp of a theme
版权声明:本文标题:How can I pass a variable from a template to header.php of a theme 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741927928a2405401.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论