WordPress.org

Ready to get started?Download WordPress

Forums

Make me Witty (23 posts)

  1. SlowTalker
    Member
    Posted 9 years ago #

    I'm am trying to use the random witty text plug in. I have the plugin installed and activated. What is the text that I need to add to my templete in order for it to display the quotes? This is what I tried < ?php witty(); ?> My search keeps leading me back to the dead end of downloading the plug in.

    Any help is greatly appreciated.

  2. ThisIsNotALoveStory
    Member
    Posted 9 years ago #

    <?php witty('<p class="witty">','</p>'); ?>

    That's what I have, with your css refelcting the style you want for the witty text.

  3. SlowTalker
    Member
    Posted 9 years ago #

    Thanks for your reply. I see I had an inappropriate space in the text <?php.... working now. Thanks again.

  4. ThisIsNotALoveStory
    Member
    Posted 9 years ago #

    no worries

  5. Typey
    Member
    Posted 9 years ago #

    Readme-first.txt typo:

    I see that the readme-first.txt file's sample call to witty is missing a closing single quote after the </p> tag. I think this is why I had trouble getting it to work, since I just cut and pasted.

    <?php witty('<p class="witty">','</p>); ?>

  6. Typey
    Member
    Posted 9 years ago #

    One other thing: please mention in future versions of the readme that blank lines in the witty.txt will supply blank witty quotes: this made me think the plugin was broken until I refreshed.

  7. CHUD
    Member
    Posted 9 years ago #

    Looks like a pretty cool plug-in. Too bad the install instructions are worthless.

  8. F1_error
    Member
    Posted 9 years ago #

    I just have to pop in and say I use Witty as well, and I really, really like it. It could use more / better documentation, but it's so simple it makes it a breeze once you get the hang of it. You can also use code on / within each line of Witty, which really leaves room for unique unusual things to be done.

  9. CHUD
    Member
    Posted 9 years ago #

    Well, I can't get the hang of it. I'm trying to run it in a specific spot on my right sidebar and all it's outputting is an error code about witty () being unspecified. I only got that far by reading posts about it here.

    Does it have to be in the index.php or am I breaking it by putting it in my right sidebar? If the sidebar placement is okay, can someone tell me exactly what code I'm supposed to be putting in, and if I have to edit anything else along with it?

  10. Lorelle
    Member
    Posted 9 years ago #

    To make it run, you can't have it inside of a post. It has to be within one of the template files. I have mine in my sidebar at the very bottom. It works loverly.

    Here is an example of my tag:

    <ul>
    <li><?php _e('Thoughts'); ?>
    <ul><li id="witty"><?php witty (); ?></li></ul></li>
    </ul>

    The text file needs to be NOT in the plugin directory. It must be in the wp-content folder. The text file can use html and each quote or use must be on its own line, but you can use <br /> for line breaks within the quote. Here are the first two of mine:

    Wear a smile and have friends; wear a scowl and have wrinkles. What do we live for if not to make the world less difficult for each other?<br /><i>George Eliot</i>
    Travel has a way of stretching the mind. The stretch comes not from travel's immediate rewards, the inevitable myriad new sights, smells and sounds, but with the experiencing firsthand how others do differently what we have believed to be the right and only way. <br /><i>-- RalphCrawshaw</i>

    Hopefully that will work for you. Click on my name to see this in action on any of my articles.

  11. F1_error
    Member
    Posted 9 years ago #

    I make use of mine in the header
    <p id="witty"><?php witty(); ?></p>
    and that's the code that works for me.
    I'm sure you could put it in the sidebar, you'd just have to follow your sidebars outline. ie.
    <ul><li>PUT WITTY HERE</li></ul>
    or something like that.

  12. CHUD
    Member
    Posted 9 years ago #

    I copy/pasted your code directly into my sidebar.php file (even though I knew your "Thoughts" reference wouldn't work).

    Result: Fatal error: Call to undefined function: witty() in... and it points to the directory witty is in.

    I have witty.txt in the wp-content folder, witty.php is in the plugins folder. I'm cool with formatting the actual quotes I want witty to use, but I can't get witty itself to work. Does anyone have any idea what I'm doing wrong here?

  13. Lorelle
    Member
    Posted 9 years ago #

    It should work great. Make sure that your witty.txt is totally text with no quotes and not from a word processing file. I checked my notes and it worked for, as soon as I figured out what I described to you above, perfectly.

    You might want to consider using another random file plugin. There are others out there. Maybe one of those will work for you.

  14. CHUD
    Member
    Posted 9 years ago #

    Oops, correction, the fatal error is pointing to the template file I pasted the witty reference into.

  15. F1_error
    Member
    Posted 9 years ago #

    Where is your Witty.txt file located? Do you have it in the plugins folder?

  16. vkaryl
    Member
    Posted 9 years ago #

    If for some reason, "witty" isn't working for you, try McMike's Random Quote of the Day from http://www.mcmike.nl/english/?page_id=6.

    I use it, works really well, easy to install and tweak. You will have to run an sql query to add a table.

  17. Lorelle
    Member
    Posted 9 years ago #

    CHUD, so the problem may be there and not with witty. Good luck.

  18. CHUD
    Member
    Posted 9 years ago #

    Thanks for the tip, vkaryl, I got McMike's plug-in working. Too bad the witty wouldn't work for me, it would have been nice to be able to just plug-and-play rather than having to muck about in mysql. Thanks for the help to Lorelle and F1 too.

  19. vkaryl
    Member
    Posted 9 years ago #

    Yeah - I couldn't get witty working either.... not the same probs IIRC, but that was a while back.

    Only adding one table's not bad. And it's got that nice Manage page control panel - makes adding fun quotes really easy. I did a couple hundred in about half an hour (already in a text file, just copy n paste one at a time....)

  20. gutielua
    Member
    Posted 9 years ago #

    Wow!!! Witty ROCKS!!!

  21. Lorelle
    Member
    Posted 9 years ago #

    yes it does

  22. kickass
    Member
    Posted 9 years ago #

    I don't know if this will help, but this theme I have available for download has the call for the witty plugin in place and it works fine in this theme.
    http://kickasswebdesign.com/wordpress/2005/06/kickass-squawk-wordpress-theme-available-for-download/

    Maybe seeing how I set it up will help anyone who is trying to make it work in their own theme of choice.

    And I agree- Witty ROCKS!!!

  23. jwurster
    Member
    Posted 9 years ago #

    I agree --- Witty rocks. I use it in my sidebar not for the quotes that were originally in the witty.txt file but for quotes that someone sent me in a MS Word document. After a little cleanup, the quotes worked fine.
    jim

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags