Automatic insetion of a "non-blank" excerpt into (7 posts)

  1. arghnoname
    Posted 12 years ago #

    I was looking at your page again, and you use a paragraph class instead of a div id. I think a class is the better way to go since, presumably, there will be more than one instance of the quote.
    I also wanted to ask if you tried to change the style in the actual index, instead of in the css. You might have a cascading issue.
    When you make your next pullquote (or edit an old one), try to <p style="font-family: Georgia;">
    If that works, you have something in your CSS over-riding your attempts to change the style. Being more specific in your CSS might help if that's the case, as I think generally the more specific and the closer to the source the style info is, the more precedence it has.
    so you could add a p to your pullquote css property.
    .pullquote p {...}

  2. thunderbyrd
    Posted 12 years ago #

    Okay! Wow! I did checked everything out, and took your suggestions, and now all is working according to spec. Thank you very much!
    Now all I need is for someone with good php skills to show me how to leave the excerpt call out if there is no excerpt. Currently, if there isn't one, then the first 251 (or so) words of the post get used instead. I just don't know how to write the code for the check.
    But... thank you for the help with the .css portion of it!

  3. thunderbyrd
    Posted 12 years ago #

    I tried those, but no joy.
    Oh well. Thanks for your efforts!

  4. arghnoname
    Posted 12 years ago #

    I've been looking at some php books in the library, as learning the language is on my list of things.
    I think all you need to do is create a new function that will check the excerpt box and if null, then return nothing, and if not, then return your text as pullquote. It might take me a few days, maybe a whole week or two to learn how to do this simplest of functions.
    It'll give me something to pop my php cherry on, so to speak, but you'll have to bear with my slow ass. I'll ask you for your index.php when I'm ready to give it a good go, if you don't mind.
    I was hoping someone else would pop in and answer, but support around here, as with most free open source things, can be a little spotty.

  5. Anonymous
    Posted 12 years ago #

    I was thinking more along the lines of:
    <?php if(get_the_excerpt()) echo '<div class="pullquote">'.get_the_excerpt().'</div>'; ?>

  6. Beel
    Posted 12 years ago #

    oops, logged out since last night.

  7. arghnoname
    Posted 12 years ago #

    Did I screw mine up? Should he use print $output instead of return $output?
    Thanks spartas for fixing up my really sloppy pullquote. I don't know how I forgot to even define the class there.

Topic Closed

This topic has been closed to new replies.

About this Topic