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