Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 如何将自定义帖子类型添加到“管理”菜单?_Php_Wordpress_Wordpress Theming_Custom Post Type - Fatal编程技术网

Php 如何将自定义帖子类型添加到“管理”菜单?

Php 如何将自定义帖子类型添加到“管理”菜单?,php,wordpress,wordpress-theming,custom-post-type,Php,Wordpress,Wordpress Theming,Custom Post Type,我把文件放错文件夹了吗 所有这些代码在添加后都会在我的管理菜单上显示为文本。我试着将它直接放入我的functions.php中,并将其放入名为function.php的文件中,这就是教程所说的,我认为这是一个打字错误 themes/theme-name/wp-includes/post.php 将您的代码包括在: <?php //your functions ?> 希望它有助于展示如何将此函数嵌入主题/theme name/wp includes/post.php更新了我

我把文件放错文件夹了吗

所有这些代码在添加后都会在我的管理菜单上显示为文本。我试着将它直接放入我的
functions.php
中,并将其放入名为
function.php
的文件中,这就是教程所说的,我认为这是一个打字错误

themes/theme-name/wp-includes/post.php
将您的代码包括在:

<?php

//your functions

?>


希望它有助于

展示如何将此函数嵌入
主题/theme name/wp includes/post.php
更新了我的代码。您是否尝试将代码包含在
中?没有一个示例显示。。。我以为Wordpress会自动这么做。谢谢你的帮助。我想这么做,但觉得太明显了。。。!
themes/theme-name/functions.php
/*-----------------------------------------------*/
/* Custom Post Types
/*-----------------------------------------------*/
require_once('wp-includes/post.php');
<?php

//your functions

?>