admin管理员组文章数量:1130349
I want to run some PHP to show custom fields in a page;
<?php
$showExcerpt = get_theme_mod( 'auto_excerpt' , '' );
if( is_single() ) {
the_content();
} else {
if ( $post->post_excerpt ) {
the_excerpt();
?>
I want to add the code after the content if the page is single, otherwise I do not want to show the PHP if it is just showing an excerpt.
I want to run some PHP to show custom fields in a page;
<?php
$showExcerpt = get_theme_mod( 'auto_excerpt' , '' );
if( is_single() ) {
the_content();
} else {
if ( $post->post_excerpt ) {
the_excerpt();
?>
I want to add the code after the content if the page is single, otherwise I do not want to show the PHP if it is just showing an excerpt.
本文标签: Adding PHP to an if else loop
版权声明:本文标题:Adding PHP to an if else loop 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749049927a2308453.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论