Results 1 to 4 of 4

Thread: Ajaxtabs & Wordpress

  1. #1
    Join Date
    Feb 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Ajaxtabs & Wordpress

    Script: Ajaxtabs
    http://www.dynamicdrive.com/dynamici...axtabscontent/

    I'm using Ajaxtabs within wordpress. I am am pointing to external PHP documents that make calls the wordpress loop to display 1 post from a specific category. Unfortunately, I get a PHP error in that tab:

    Code:
    Fatal error: Call to undefined function query_posts() in /myroot/domain/blah/ajaxtabs/feature-outdoors.php on line 3
    Here are the first 3 lines of that script:

    Code:
    <?php 
    // this is where the Lead Story module begins   
       query_posts('showposts=1&cat=5'); ?>
    Any help is appreciated... will provide specific URL via PM if it would help...

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Hmm that's not enough information unfortunately to go by. But in general, if you're getting a PHP error versus a JavaScript one, it has nothing to do with the script itself, but rather, some syntax error in your Wordpress template itself as far as how you're outputting the code for the script. It's a server side error.

  3. #3
    Join Date
    Feb 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    The thing is... what I have displayed in the #default section is the SAME EXACT thing I have in the external php. The #default tab displays fine... the other tab does not.

    I'd rather not disclose my URL but my AIM is trigatch4 if anyone is willing to give a quick look.

    Thank you
    Rob

  4. #4
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    I've never worked with Wordpress' templating system, but the bottom line is, any client side script (ie: Ajax Tabs Script) will work as long the server outputs it as if you were manually including the script on your page in terms of the code embedded when you "view source". If there is a PHP error getting to that point, then the issue isn't related to the script itself, but Wordpress' template system. Perhaps it has a list of reserved words you're stepping on, or convention you're not following etc. But again, this is a server side issue.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •