WordPress.org

Forums

[resolved] What is wrong with this php code (4 posts)

  1. br0s98
    Member
    Posted 6 years ago #

    <?php
    global $test1;
    $test1 = get_post_meta($post->ID, 'test', $single = true);
    if($test1 === yes ) { the_content(); }
    else { the_excerpt(); } ?>

    please help rectify it ...

  2. br0s98
    Member
    Posted 6 years ago #

    it only displays the_content but not the_excerpt

  3. br0s98
    Member
    Posted 6 years ago #

    resolved. thanks anyway

  4. garethooper
    Member
    Posted 5 years ago #

    Whats the resolution?

    By providing the resolution, even if self resolved, can help others with the same query.

Topic Closed

This topic has been closed to new replies.

About this Topic