Forums

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

  1. br0s98
    Member
    Posted 7 months 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 7 months ago #

    it only displays the_content but not the_excerpt

  3. br0s98
    Member
    Posted 7 months ago #

    resolved. thanks anyway

  4. garethooper
    Member
    Posted 7 months ago #

    Whats the resolution?

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

Reply

You must log in to post.

About this Topic