如何在wordpress上创建自己的自定义<?php get_xxxxxx(); ?>函数


How to creat own custom <?php get_xxxxxx(); ?> function on wordpress

我想将我的页面内容分发到WordPress主题的各种文件中。就像我可以对页眉、侧边栏和页脚所做的那样。

类似的东西

<?php get_imageslidercontent(); ?>

或其他任何东西。

您应该将此函数放在主题根文件夹中的函数.php文件中,然后您可以在主题中使用您的函数