WordPress.org

Forums

Q and A FAQ and Knowledge Base for WordPress
[resolved] [Plugin: Q and A - FAQ Plugin] jQuery effect not working on Q and A (17 posts)

  1. david.rahrer
    Member
    Posted 4 years ago #

    Hi Dalton,

    Q and A is the perfect FAQ plugin for me, just enough functionality without getting in the way -- great job. Now the problem; everything seems to work except the jQuery effects. When you click on the question link, it seems to go to another page with just that question and answer displayed and no apparent way to get back. You can check it out here.

    One thing, I did follow the instructions about re-saving the permalink settings. However, I can't see any change in the content of the .htaccess file (in case there should be). I've checked everything several times and am at a loss.

    Any ideas? I really want to use this plugin. Thanks!

    http://wordpress.org/extend/plugins/q-and-a/

  2. Dalton Rooney
    Member
    Plugin Author

    Posted 4 years ago #

    Hi David,
    Your page is loading multiple copies of the jQuery script, which will break any jQuery code on the page. It looks like one version is hard-coded into the theme (<script src="http://www.rahrer.com/wp-content/themes/Teknium/js/jquery-1.2.6.js" type="text/javascript"></script> ), so just comment that out in your source and you should be fine.

    Dalton

  3. david.rahrer
    Member
    Posted 4 years ago #

    Thanks for the prompt reply. That seemed reasonable but I've commented out the extra code (used for a slideshow on the main page of the theme) and Q and A still doesn't work. Have you any other suggestions? It does work when I switch to the default theme that comes with WP so I'm sure it's in the theme, but after going over it tonight I'm still confused.

    Thanks again.

  4. Dalton Rooney
    Member
    Plugin Author

    Posted 4 years ago #

    Aha - it looks like your theme is missing the wp_footer() function in footer.php. Take a look in the default theme's footer.php for an example of where it should go - just before the </body> tag. That should do the trick.

    Cheers,
    Dalton

  5. david.rahrer
    Member
    Posted 4 years ago #

    Excellent! It works perfectly now. I will make sure to tip you with the first money in my Paypal account.

    Thanks!
    David

  6. Dalton Rooney
    Member
    Plugin Author

    Posted 4 years ago #

    Glad that worked! That problem would have cropped up sooner or later - scripts are called at the bottom of the page all the time. Good luck with the new site!

    Dalton

  7. ash.matadeen
    Member
    Posted 4 years ago #

    Hi Dalton,

    I'm having the same problem as David; everything working except for the jQuery effects. I am using jQuery for other parts of the site but even when I comment that out, the effects don't work. The page is here: http://s103824.gridserver.com/filmoxford/faq

    I've also made sure to add wp_footer() in footer.php but still no luck.

    Would appreciate any insights.
    Thanks,
    Ash

  8. Dalton Rooney
    Member
    Plugin Author

    Posted 4 years ago #

    Hi Ash,
    You're still missing the script in the footer. When it's working you'll see

    <script type='text/javascript' src='http://yoursite.com/plugins/q-and-a/js/qa.js?ver=0.1.4'></script>

    at the bottom of your source.

    Are you sure footer.php is being called? Your template needs to have the get_footer() function in there somewhere, which calls footer.php, which then loads the wp_footer() function at the end. Make sense?

    Dalton

  9. ash.matadeen
    Member
    Posted 4 years ago #

    Yes, I call get_footer() from my custom page template and then wp_footer() from my footer.php. I've just tried echoing some text just before and after I call wp_footer() in footer.php and the echos output correctly.

    Not sure why wp_footer() isn't actually doing anything despite being called. Looks like someone else has the problem.

    Anyway, thanks for the tip on the script to look out for. I've now added

    <script type='text/javascript' src='http://yoursite.com/plugins/q-and-a/js/qa.js?ver=0.1.4'></script>

    in footer.php (just before </body>) and it seems to have done the trick. Am I ok using it in that way or would this cause other problems with the plugin?

    Thanks again,
    Ash

  10. Dalton Rooney
    Member
    Plugin Author

    Posted 4 years ago #

    Adding it manually should work! I don't think there's any problem unless your wp_footer function starts working again and then you'll have it loading twice.

    Actually it would be good to troubleshoot that problem, a lot of plugins rely on that function. Does it work when you're using the default twentyten theme?

  11. ash.matadeen
    Member
    Posted 4 years ago #

    Great, think I'll leave it at that for now and keep an eye out for it when updating wordpress in future.

    Yes, oddly enough, it works just fine with the twentyten theme.

  12. ash.matadeen
    Member
    Posted 4 years ago #

    Just found the cause of my issues. I needed to call <?php wp_head() ?> in my header.php. Works brilliantly now. :)

  13. Dalton Rooney
    Member
    Plugin Author

    Posted 4 years ago #

    Aha! That's good to know! I will keep that in mind if it ever comes up again. Glad all working now.

    Dalton

  14. brunorota
    Member
    Posted 4 years ago #

    Hi Dalton

    I'm wanting to use your plugin, but I am having trouble using it properly

    I created two faqs and added the tag [qa] on my page, the result was as follows http://www.datasun.com.br/faqtest/

    I wish the answers stay hidden in the same example as I do that?

    Graciously

  15. brunorota
    Member
    Posted 4 years ago #

    Hi Dalton

    I'm wanting to use your plugin, but I am having trouble using it properly

    I created two faqs and added the tag [qa] on my page, the result was as follows http://www.datasun.com.br/faqtest/

    I wish the answers stay hidden in the same example as I do that?

    Graciously

  16. Dalton Rooney
    Member
    Plugin Author

    Posted 4 years ago #

    Brunorota - Your minify script is confusing the javascript, you may want to try disabling that and see if it fixes the problem.

  17. brunorota
    Member
    Posted 4 years ago #

    Dalton I do not understand what you mean

    What do I need on my site to disable this plugin is working correctly?

    Graciously

    Bruno Rota Sargi

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags