Support » Fixing WordPress » Any php coders here?

  • I want to use the excerpt tag, for a subtitle under each post.

    only, if i should choose not to use a subtitle/excerpt, i want nothing to appear, instead of the first paragraph.

    Anyone here know the proper way to write out the If – Else tag for this?

    much appreciated.

Viewing 13 replies - 1 through 13 (of 13 total)
  • I want to use the excerpt tag, for a subtitle under each post.
    a subtitle under the content? under the title?

    only, if i should choose not to use a subtitle/excerpt, i want nothing to appear, instead of the first paragraph.
    If you should choose not to use a subtitle … when would that be?

    …you want nothing to appear…nothing, nada, just a title and white blank space?

    …instead of the first paragraph…so when you have subtitle, you want to have the first paragraph as well? and when no subtitle, no first paragraph?

    sorry. I guess I didnt explain well.

    but yes, the first two were correct.

    When I fill in the excerpt, I want it to appear. When I leave the excerpt field blank, I want to not have the first paragraph show, like it does by default.

    I want to not have the first paragraph show
    By “first paragraph” you mean fake excerpt?

    <?php the_title(); ?>
    <?php
    if( !empty( get_the_excerpt() ) ) { /* if I fill in the excerpt textarea */
    the_excerpt(); // then display it
    }
    ?>;

    hmm… that looks like it would be right..

    but I get this on my page when I use it.

    “Parse error: parse error, unexpected T_STRING, expecting T_VARIABLE or ‘$’ in /home/passth35/public_html/02/wp-content/themes/pta02/index.php on line 88”

    Line 88 = “if( !empty( get_the_excerpt() ) ) {”

    <?php
    if( !empty( $post->the_excerpt ) ) {
    the_excerpt();
    }
    ?>

    that one doesn’t seem to work either 😐

    the page shows fine, it just acts as if nothing is where the excerpt tag is…

    any more ideas?

    Thanks for the help you’ve been so far though.

    My bad, typo

    <?php
    if( !empty( $post->post_excerpt ) ) {
    the_excerpt();
    }
    ?>

    Man walks into a bar and shouts, “Any beer lovers here?”

    🙂

    Use better titles, Chad.

    alphaoide! It works!!!

    Yer the man! Thanks alot!

    Ok, now try this one on for size alphaoide… or… tell me if it’s even possible…

    On pop up comments, when you click the comment authors URL, it opens in that same small sized window…

    I was thinkin it’d be sweet to give it a target=_blank attribute.

    How would I do that to this tag?

    <?php comment_author_link() ?>

    After much foul language and pulling of the hair, I was able to fix the author comment problem by using the following code in my comments-popup,php file:

    <a href="<?php comment_author_url() ?>" target="new"><?php comment_author()?></a>

    Crude. But it works. 🙂

    Chad,
    Posting an effective question in the forums.

    understood. thanks.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Any php coders here?’ is closed to new replies.