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

  • Home
  • SEARCH
  • 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 6561839
In Process

The Archive Base Latest Questions

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

link this is my index.php of the theme I try to modifiy the query_post

  • 0

link this is my index.php of the theme
I try to modifiy the query_post but doesn’t work
How can show only 1 post ??

Very thanks

  • 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-25T13:38:15+00:00Added an answer on May 25, 2026 at 1:38 pm

    find this line:

    <?php while (have_posts()) : the_post(); ?>
    

    Then replace that line with this code:

    <?php $my_query = new WP_Query('showposts=1');
    while ($my_query->have_posts()) : $my_query->the_post();
    $do_not_duplicate = $post->ID; ?>
    

    You can change the number 1, to whatever number you want if for example you need 3 posts.
    Hope this help.

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

Sidebar

Related Questions

I have tried to do this refering to following link. http://skypher.com/index.php/2008/07/28/function-list-for-php/ But no success.
My website has a structure like this: root folder contains --- > 1)index.php 2)
very simple folderstructure like this … index.php img someimage1.jpg someimage2.png someimage3.jpg I wonder how
My Page name is index.php and its contain some links(internal page link) and contents.
Hay all, this is really bugging me. I have downloaded phpimage from http://sourceforge.net/tracker/index.php?func=detail&aid=2844769&group_id=103281&atid=738747 I've
I have a list of Url in file url.data like this http://site1.org/info.php http://site2.com/info/index.php http://site3.edu/
I am trying for twitter example.http://www.android10.org/index.php/articleslibraries/291-twitter-integration-in-your-android-application i got example from this link.I am getting
For example on any tinyurl/ajdeijad link (this one is fake), the think redirects to
This link shows how to inject JavaScript code to WebView object in Android. However
From this link the author suggested: table.setWidth(100%, true); table.setColumnWidth(nameColumn, 35.0, Unit.PCT); table.setColumnWidth(addressColumn, 65.0, Unit.PCT);

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.