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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T10:24:16+00:00 2026-05-16T10:24:16+00:00

I have a site whose home page shows a single WordPress category page. I’m

  • 0

I have a site whose home page shows a single WordPress category page. I’m using a custom theme and the index.php file there does a 301 redirect to “mysitename.com/?cat=3”. This page is generated with an event calendar plugin and a lot of custom code. It works, but the displayed URL is “mysitename.com/?cat=3” which I’d prefer my visitors not see; I’d rather have the URL be just “mysitename.com”, “mysitename.com/index.php”, or even “mysitename.com/calendar”.

The visitor can view “prev month” and “next month”, which result in URLs like “mysitename.com?cat=3&eventDate=2010-07&bt=a” — still within the same category but with additional parameters in the URL. (I am OK having a more convoluted URL like this shown to my visitors on previous/next month; it’s just the initial page URL I’d like to be nicer.)

I’ve messed around with the permalinks but can’t get nice URLs to work correctly that way. Is there an .htaccess way to do this?

  • 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-16T10:24:17+00:00Added an answer on May 16, 2026 at 10:24 am

    In the “permalinks” section under the “Settings” tab, you can add a category base to the categories.

    Thus if you have a category base of “category” and a category name “Cool Stuff” with a slug of “cool_stuff”

    Your category link would link like this depending on your permalink settings.

    http://yoursite.com/category/cool_stuff/


    Okay. My Last answer was not base on your “edited question”.

    If you remove the 301 redirect to “mysitename.com/?cat=3”
    you can edit the index.php file.

    This will most likely take care of your url issue.

    You can edit the loop to show only categories from id: 3

    Thus, you will make a querypost for category 3 as follow:

    <?php query_posts('showposts=9'); ?>
    

    See Query Post @ WordPress for more info.

    Put this before the loop.

    The coding may look like this:

    <?php query_posts('cat=3'); ?>
    <?php if (have_posts()) {?>
        <?php while (have_posts()) : the_post(); ?>
            <li>
                <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a>
                <span style="float: right;"><?php the_time('m/d/y'); ?></span>
            </li>
    <?php endwhile; }?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

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.