0

我正在使用 Wordpress 主题(创世框架),我需要在 post 元函数中输入一个 php 片段(就在 post_edit 之后)。如果不抛出错误,我似乎无法让它工作。

这是我需要使用的功能:

add_filter( 'genesis_post_info', 'sp_post_info_filter' );
function sp_post_info_filter($post_info) {
    $post_info = '[post_date] by [post_author_posts_link] [post_comments] [post_edit]';
    return $post_info;
}

这是我需要使用的 PHP 片段

<?php echo get_post_meta( $post->ID, 'jetpack-post-views', true ); ?>

我只是不知道应该把它放在哪里......(我在 [post_edit] 之后立即尝试并得到了这个错误)

Parse error: syntax error, unexpected T_STRING in /nfs/c08/h04/mnt/152909/domains/genesis.pixelworklab.com/html/wp-content/themes/eleven40-pro/functions.php on line 27

有任何想法吗?谢谢!!!

4

0 回答 0