• Resolved leoncub

    (@leoncub)


    Hi there! I’ve been trying to make my tagline display randomly rotating quotes and have found wp_quotes and Witty Text. I’ve managed to get them both working, but I have the same problem in both of them.

    WordPress seems to strip the quotes of their formatting, or to be more precise it doesn’t apply the CSS formatting specified to them which is causing layout problems on my blog.

    The theme I’m using (Regulus) calls the quotes in the header like this:
    <p class="site_description"><?php wp_quotes_random(); ?></p>
    however, it doesn’t apply the formatting of “#header p{}” to it which in this case specifies a padding on the right hand side of 95px.

    This means that it is not being indented to the left by 95px which means that the text is obscured by the header image. However, if you change the call from witty() or wp_quotes_random() back to the default of bloginfo(‘description’), it is formatted properly!

    Does anyone know why this is happening or a solution to the problem?

    Thanks for your help
    Leon

Viewing 11 replies - 1 through 11 (of 11 total)
  • Try using #header p.site_description – sometimes, and for unknown reasons, you have to get down and dirty with the specificity.

    Thread Starter leoncub

    (@leoncub)

    Hi thanks for your reply! When you say “use” that, what do you mean exactly? Do I need to create a new class called p.site_description or what code do I need to type?

    I don’t know if this is relevant at all, but I’ve noticed that no matter what comes before the <?php> bracket in either the <p> or any other HTML tags is obeyed, it’t all completely ignored. I tried specifying the formatting directly in the p tag with class="..." and even wrapping a font tag around it with crazy formatting just to see if it works, but nothing does. 🙁

    How are you editing the file?

    In the css replace #header p with #header p.site_description and see if that helps.

    [And if it doesn’t, let me see if I can figure it out on one of my test-site sandboxes…. might take a day or so….]

    Thread Starter leoncub

    (@leoncub)

    I edited the style.css file and replaced it as you said, but it is being completely ignored. Everything is ignored for some reason.

    Okay, you need to do something with the wp_quotes_quote class wherever it is in the css. That looks like what’s overriding the css for the header description.

    [Try aardvark extension for FF prior to 2.0, or view formatted source no matter what FF version – and if you aren’t using FF when you’re tweaking, YOU SHOULD BE.]

    Thread Starter leoncub

    (@leoncub)

    There is no class for wp_quotes but by default it did come wrapped in its own div class that I took out. However, Witty Text comes as “plain” text and you can actually specify the formatting you want like this witty($before, $after) and I’ve tried adding <p class="site_description"> and a whole host of other things I can think of to try and format it but it just doesn’t work. Tis a headscratcher!

    Well, I’ve NEVER had any luck with anything like this other than mcmike’s Random Quote of the Day. What happens if you add the wp_quotes_quote class to the css with the margin px you need?

    I’ll look at it tomorrow on a test bed. It’s an interesting problem…. I’d never thought about doing a random quote in the description, but it would be handy to have…. hmmm.

    😛

    ? Whoo, what’s that mean? What did I miss?

    Thread Starter leoncub

    (@leoncub)

    Hooray, it’s working! I’ve managed to get it working with Witty Text, don’t think there was ever a chance with wp_quotes!

    I managed to get it working by specifying $before as <p class="site_description"> as I had done before, but it works now because of your suggestion of adding the class #header p.site_description to my CSS file.

    Thank you very much vkaryl, I really appreciate your time and help! 😀

    Heh. Glad it worked…. now you’ve got me tweaking mcmike’s plugin to do the same. Thanks for the idea. Have fun!

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Problem with random quotes in tagline’ is closed to new replies.