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 574827
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T13:52:23+00:00 2026-05-13T13:52:23+00:00

I have created a custom page named ‘products’ <?php /* Template Name: Products */

  • 0

I have created a custom page named ‘products’

<?php
/*
 Template Name: Products
*/
?>
<?php get_header(); ?>

<div id="products_content">
  <div id="products_page_header">
    <div id="products_page" title="محصولات">
      <?php if (have_posts()) : while (have_posts()) : the_post();?>
      <div class="post">
        <h2 id="post-<?php the_ID(); ?>">
          <?php the_title();?>
        </h2>
        <div class="entrytext">
          <?php the_content('<p class="serif">Read the rest of this page &raquo;</p>'); ?>
        </div>
      </div>
      <?php endwhile; endif; ?>
    </div>
  </div>
</div>
<div id="clear"> </div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
</div>
</body></html>

but it doesnt show my posts, what am I doing wrong ?

  • 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-13T13:52:24+00:00Added an answer on May 13, 2026 at 1:52 pm

    This Code doenst shows your Posts like an Blog Page, this Code shows only the Content of the Page “Products”, to show all your Posts, you must use another code:

    <?php
    /*
     Template Name: Products
    */
    ?>
    <?php get_header(); ?>
    
    <div id="products_content">
      <div id="products_page_header">
        <div id="products_page" title="محصولات">
          <?php $query = new WP_Query('showposts=10'.'&paged='.$paged); ?>
                <?php if ($query->have_posts()) : ?>
            <?php while ($query->have_posts()) : $query->the_post(); ?>
          <div class="post">
            <h2 id="post-<?php the_ID(); ?>">
              <?php the_title();?>
            </h2>
            <div class="entrytext">
              <?php the_content('<p class="serif">Read the rest of this page &raquo;</p>'); ?>
            </div>
          </div>
          <?php endwhile; endif; ?>
        </div>
      </div>
    </div>
    <div id="clear"> </div>
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>
    </div>
    </body></html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a custom PHP page name privicy pollicy with name privacy.php. How
I have created custom posts and I want one page in my site to
I have created a custom style and template for MenuItem and ContextMenu, and for
I have created a custom page for error messages in my web application. I
I have created a custom editor template for input file in MVC3. I want
I am creating a page-based WPF application using MVVM. I have created a custom
I have a custom taxonomy called dcategory so I have created a template file
I recently created a new template page, I put the obligatory <?php /* Template
I have created custom jQuery UI widget called uiPopover, very similar to UI-dialog (in
I have created custom cell in which there are n number of image views.

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.