Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6391197
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T03:38:34+00:00 2026-05-25T03:38:34+00:00

For example: <?php $numposts = $_POST[‘showposts’]; ?> <?php $home_query_bottom = new WP_Query(cat=&showposts=$num_posts&offset=5); $b =

  • 0

For example:

<?php $numposts = $_POST['showposts']; ?>


<?php $home_query_bottom = new WP_Query("cat=&showposts=$num_posts&offset=5"); $b = 0; ?>
<ul class="thumbs">
    <?php while ($home_query_bottom->have_posts()) : $home_query_bottom->the_post();
        $do_not_duplicate = $post->ID; $b++; ?>

        <li class="post-<?php the_ID(); ?> thumb"><?php get_the_image( array( 'custom_key' => array( 'thumbnail' ), 'default_size' => 'thumbnail', 'width' => '160', 'height' => '160' ) ); ?></li>
    <?php endwhile; wp_reset_query(); $b = 0; ?>
</ul>

The code above is on its own php file ready to be called by the main wordpress page, however I get an error saying wp_query class not found. I’m assuming it’s because I am not using the header.html which probably has a bunch of includes. What do I need for that page to utilize the wp_query class?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T03:38:34+00:00Added an answer on May 25, 2026 at 3:38 am

    You have to make the page that ajax calls a template page.
    Make a new page in your blog and assign the template.
    no headers no includes.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My php is weak and I'm trying to change this string: http://www.example.com/backend.php?/c=crud&m=index&t=care ^ to
I would like to change: http://example.com/index.php?p=blog&pid=2&lid=1&l=en into just http:// example.com/en/blog.html or just http:// example.com/blog.html
Example php code: class TestArrayObject extends ArrayObject { function offsetSet($index,$val){ echo $index.':'.$val.PHP_EOL; } }
<link href=http://example.com/example.php?id=0&grab=http%3A%2F%2Fwww.example.org%2Fcss%2Fmaster.css rel=stylesheet type=text/css media=all /> - is that URL allowed? Any MIME type
let say i pass url, example.php?mode=select&ID=1#age is it possible to add jquery fadeIn based
is it possible to retrieve $_get's index name? eg. example.php?la=1&lala=2&lalala=3 how to print 'la',
See the following example (PHP) class Parent { protected $_property; protected $_anotherP; public function
I have executed a php script through GET request ex: http://localhost/example.php?id=9&name=exammple Now the example.php
For example: A.php (the config file): <?php $a = array('name'=>'wine[$index][name]', 'value'=>'wine[$index][value]' ) ?> B.php:
Here's a PHP example of mine. Can anyone find a shorter/easier way to do

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.