Skip to main content

Easy way to remove category form your WordPress site URL.

Short Answer:
1.      Go to WordPress settings
2.      Select Permalinks
3.      Select Custom Structure and enter: /%category%/%postname%.html
4.      Set Category base to: /.

I have three main category for my posts in WordPress website viz. Blog, BSc CSIT and Portfolio. These category are on my main menu, so that people can click it and see the corresponding posts that falls under each category. WordPress by default makes the URL of each category look like www.yourdomain.com/category/category_name, i.e. in my case, www.shirishkoirala.com.np/category/blog. I don’t want that category to show up, every time I share my blog post I just want to tell people to go to www.shirishkoirala.com.np/blogs and you will find all my blog post there. This URL will be easy to share and remember. So I searched the internet and found many solution. But many of them broke my pages and redirected to 404 page, other solution actually want me to edit some php files and I didn’t want that either. Finally, I found a simple solution, and that I have done and till now find no problems. So, simple way to remove category from your WordPress site URL and it goes like this.
1.      Go to WordPress settings and select permalinks

2.      Under Common Settings select Custom Structure and enter: /%category%/%postname%.html

3.      Now under Optional settings set category base to: /.

4.      Now click save changes and you are done.

Comments

Popular posts from this blog

SAP-1(Simple as Possible-1) Computer Architecture Introduction

The Simple-As-Possible (SAP)-1 computer is a very basic model of a microprocessor explained by Albert Paul Malvino. The SAP-1 design contains the basic necessities for a functional Microprocessor. Its primary purpose is to develop a basic understanding of how a microprocessor works, interacts with memory and other parts of the system like input and output. The instruction set is very limited and is simple. The features in SAP-1 computer are: W bus – A single 8 bit bus for address and data transfer.  16 Bytes memory (RAM)  Registers are accumulator and B-register each of 8 bits.  Program counter – initializes from 0000 to 1111 during program execution.  Memory Address Register (MAR) to store memory addresses.  Adder/ Subtracter for addition and subtraction instructions.  A Control Unit  A Simple Output.  6 machine state reserved for each instruction  The instruction format of SAP-1 Computer is (XXXX) (XXXX) A Simple animation ...

[FIX]Illuminate\Database\QueryException SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client (SQL: select * from information_schema.tables where table_schema = enrolmentsystem and table_name = migrations and table_type = 'BASE TABLE')

Illuminate\Database\QueryException    SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client (SQL: select * from information_schema.tables where table_schema = enrolmentsystem and table_name = migrations and table_type = 'BASE TABLE')   at vendor/laravel/framework/src/Illuminate/Database/Connection.php:678     674▕         // If an exception occurs when attempting to run a query, we'll format the error     675▕         // message to include the bindings with SQL, which will make this exception a     676▕         // lot more helpful to the developer instead of just the database's errors.     677▕         catch (Exception $e) {   ➜ 678▕             throw new QueryException(     679▕                 $query, $this->prepareBindings($binding...