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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T00:08:08+00:00 2026-06-18T00:08:08+00:00

When I type localhost/?cat=3 for example, to show all posts of category whose ID

  • 0

When I type “localhost/?cat=3” for example, to show all posts of category whose ID is 3, instead of doing it, it shows all posts of all categories (which is the job of my index.php), so I guess that a redirection to homepage is happening. I really don’t know what to do. Can you help me? Here is the code of index.php to retrieve posts:

<?php 
        $tmp = $wp_query;
        $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
        $wp_query = new WP_Query('cat=-4&posts_per_page=5&paged=' . $paged);
        if ( $wp_query->have_posts() ) : while ( $wp_query->have_posts() ) : $wp_query->the_post(); ?>
    <div id="wrapper2">
        <div id="topicos" >
            <p id="titulo"><?php the_title(); ?></p>
            <p id="data_public">Publicado em <b><?php the_time('j') ?> de <?php the_time('F, Y') ?> </b> por <?php the_author() ?></p>
            <?php if(has_post_thumbnail()){
            ?>  <div id="thumbnail">
                    <?php the_post_thumbnail(); ?>
                </div>  
                <?php
            }
            ?>
            <div id="prv_texto"><?php the_excerpt(); ?></div>

            <p id="cont_lendo"><a href="<?php the_permalink(); ?>">Continuar lendo...</a></p>
        </div>
         <?php endwhile; ?>
         <?php endif; ?>
  • 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-06-18T00:08:10+00:00Added an answer on June 18, 2026 at 12:08 am

    Have you tried making an archive.php file in your theme, and running a bare bone WordPress loop without a custom query before it?

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

Sidebar

Related Questions

Hi i have come across some urls of the type http://localhost/jsfweb/cat/query/ where query is
Using the code from this example, I open the browser, type localhost/ and I
I want to have possibility to access action by the following URL type: http://localhost/MyControllerName/MyActionName/Id1+Id2+Id3+Id4
I have a website, at localhost:82 when I type this into IE, it comes
code: sql.php <?php $uid = trim($_POST['uid']); $pass= trim($_POST['pass']); $type= trim($_POST['type']); $link = mysql_connect(localhost,root,akash); if
I am getting the following message, when I type in /localhost:8080/springapp2/ HTTP Status 404
In http://localhost I have a folder named _admin When I type http://localhost/admin practically I
I'm getting below error when I type in localhost/phpMyAdmin after starting apache and mysql
When I type localhost in the browser, I am not able to see the
The following mod_rewrite rule is causing my website to behave odd I type localhost/signin/.

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.