Många webbplatsägare önskar att de kunde använda kategorier och taggar för sina sidor, gillar de gör för blogginlägg.
Vi har också varit där. När vi byggde mer komplexa webbplatser insåg vi hur användbart det skulle vara att ha ett sätt att gruppera och märka våra sidor. Därför grävde vi ner oss i WordPress och hittade en lösning.
I den här przewodniken visar vi dig hur du lägger till kategorier och märken på dina sidor i WordPress.
Varför lägga till kategorier och tags till WordPress Pages?
Att lägga till kategorier och tags på dina pages i WordPress hjälper till att hålla dem organiserade och gör det lättare för besökarna att hitta det de letar efter.
Om du till exempel har flera försäljningssidor för olika produkter i din WooCommerce store, kan du gruppera dem under bred kategori och till och med child category pages.
Du kan göra detsamma för olika funktioner pages för dina appar och programvara. OptinMonster grupperar till exempel flera sidor med funktioner under kategorin ”Funktioner”.
Kategorier och tags för pages kan också vara till hjälp för sökmotorsoptimering (SEO). Du hjälper search engines att navigera genom ditt content och förstå strukturen på din website, vilket gör det lättare för dem att indexera och ranka dina pages.
Som standard är kategorier och tags WordPress taxonomier som är limiterade till dina blogginlägg. Så normalt kan du bara använda dem för WordPress posts. Men med några få steg kan du också tillämpa dem på dina pages.
I denna tutorial visar vi hur du addar kategorier till pages på din site i WordPress. Vi kommer också att förklara hur man addar tags till WordPress pages.
Så här lägger du enkelt till kategorier och tags på pages i WordPress
Det mest nybörjarvänliga sättet att ställa in WordPress kategorier och taggar för dina pages är att använda Pages with category and tag plugin. Det är ett gratis WordPress plugin som fungerar direkt från boxen utan att behöva konfigureras ytterligare.
Det första du behöver göra är att installera och aktivera pluginet. För mer detaljer, vänligen se vår guide om hur du installerar ett plugin för WordPress.
När du är aktiverad går du till Pages ” Add New i WordPress admin area. Du kommer att upptäcka att WordPress tags och post kategorier nu är tillgängliga för dina WordPress pages.
Därefter kan du skapa kategorier och taggar för dina pages.
För att add to en kategori, head to Pages ” Categories section from your WordPress dashboard and then enter a category ’Name’ and ’Slug’.
Efter det kan du rulla ner och välja en”Parent Category” för din kategori.
När du har enter dessa details klickar du bara på knappen ”Add New Category”.
You can then view your newly added category for your pages.
Om du vill ta bort en viss kategori klickar du bara på kryssrutan bredvid den och markerar ”Usunąć” i rullgardinsmenyn Massåtgärd. Klicka sedan på knappen ”Tillämpa”.
Därefter kan du kategorisera dina WordPress pages efter de kategorier som du just har skapat.
Börja med att redigera eller skapa en ny sida. I blockredigeraren kan du nu markera namnet på den relevanta kategorin i sidopanelen till höger om dig.
I instance, we created a feature page and marked it under the ”Features” category in the right-hand side panel.
På samma sätt kan du använda taggar för din WordPress page under fältet ”Tags”. Om du vill add to flera tags separerar du dem helt enkelt med ett kommatecken.
Du kan till exempel add to keywords och fraser som hjälper till att beskriva ditt content. I vårt fall lade vi till termerna ”exit intent” och ”OptinMonster” som tags.
När du har valt din Category och lagt till tags är det bara att update eller publicera din WordPress page. Så är det klart!
För fler guider om hur du får ut det mesta av kategorier och tags för din WordPress website, kontrollera följande tutorials:
- Så här inkluderar du Category och Subcategory i permalänkar i WordPress
- Så här addar du kategorier och tags till mediabiblioteket i WordPress
- Så här byter du namn på kategorier i WordPress på rätt sätt (przewodnik för nybörjare)
- Hur man konverterar WordPress Kategorier till Custom Taxonomies
Vi hoppas att den här artikeln hjälpte dig att lägga till kategorier och märken för inlägg på dina sidor i WordPress. Du kanske också vill ta en titt på vår artikel om hur du skapar kompakta arkiv i WordPress och vår lista över de bästa tilläggen för sökmotorsoptimering i WordPress för att optimera din webbplats.
If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.
Syed Balkhi says
Hey WPBeginner readers,
Did you know you can win exciting prizes by commenting on WPBeginner?
Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
You can get more details about the contest from here.
Start sharing your thoughts below to stand a chance to win!
Waran says
I used the Pages with category and tag plug in to create categories and assigned to my pages. Then updated my permalinks to /%category%/%postname%/ but the url still showing the page slug only, category slug not showing.
I read the comments by others, mostly talk about permalink to posts.
is it possible to show the category in the permalink of a page? that is the only reason for me to categorise the pages.
WPBeginner Support says
By default pages do not have the option to add categories so it sounds like you have a plugin or tool that is adding categories to your pages.
Administratör
Johan says
Hi, and thanks for valuable information. Does the use of this plugin mean that pages can have the same function as posts? For instance, can I make a portfolio grid containing pages instead of posts, or show several pages on a map instead of posts?
If the answer is no, is there a way to create hierarchical structure in posts? Because that what I am aiming for, a website with posts or pages in a hierarchical structure (e.g. homepage/page-a/page-a1, homepage/page-b/page-b4 etc.) where all the pages can be displayed and filtered via tags or categories in both listings and maps.
Much thankful for a reply!
Kind regards
WPBeginner Support says
It would depend on the specific function you would like but it can be a similar function to posts. For what you are looking for it would more likely be better to use subcategories which we cover in our guide below:
https://www.wpbeginner.com/beginners-guide/how-to-add-categories-and-subcategories-to-wordpress/
Administratör
Paul Wright says
Hi, I am very grateful for this information, however unfortunately when I installed and activated the plugin it completley disfigured my ”all pages” view on the dashboard , the letters identifying the page titles ran vertically down the page
thanks anyway
WPBeginner Support says
It sounds like you may have all possible fields showing on your all pages screen. If you use the screen options in the top-right of the screen you should be able to hide some information to prevent the letter scrolling on the page.
Administratör
Abud says
Hi,
Cant we make it without any plugins?
WPBeginner Support says
You can achieve this with code but by using a plugin it makes it easier to revert the change should you wish to do so. If you are concerned about the number of plugins on your site then we would recommend taking a look at our article below:
https://www.wpbeginner.com/opinion/how-many-wordpress-plugins-should-you-install-on-your-site/
Administratör
Dinesh Kumar Takyar says
Your suggested Post Tags and Categories for Pages plugin is excellent. Thank you!
Liesbeth says
Hello,
On your recommendation we’ve been using this plugin. We love the features, but one thing is still bothering us. In the search results there are no categories showing. We use the Avada theme and would love to see categories in the results. Do you know how to fix it?
WPBeginner Support says
You would want to reach out to the support for your specific theme for including the categories in the display
Administratör
Dee Torre says
Hi,
The plugin you suggested has not been reviewed for over 1 year. Could you suggest a newer one.
Tnks,
Dee
WPBeginner Support says
For that message you are likely seeing, you would want to take a look at our article below:
https://www.wpbeginner.com/opinion/should-you-install-plugins-not-tested-with-your-wordpress-version/
Administratör
Drew Downz says
I’m pretty sure a ”page” is not considered ”post”
WPBeginner Support says
Correct, they are different post types.
Administratör
Tarun soni says
I like to read your blogs because I found the solution for my query but I noticed that you suggest installing a plugin for the solution. is it possible for you to show the solution by sharing custom code, not by a plugin.
WPBeginner Support says
It depends on the issue, we do our best to add a method for using code instead of a plugin for those looking for that but not all issues are solved with a small amount of code. Plugins are also a collection of code so there’s not always a difference in the code we would show and the plugin we’re recommending.
Administratör
Joe Youngblood says
Unfortunately you can no longer install this plugin from the repository as it hasn’t been updated in 2 years. Any other options?
WPBeginner Support says
If you use the link in this article it will bring you to the plugin where you can download the plugin to use on your site. For the plugin not being updated, you may first want to take a look at our article here: https://www.wpbeginner.com/opinion/should-you-install-plugins-not-tested-with-your-wordpress-version/
Administratör
Martin Vernal Burrows Jr. says
Is there an advantage using pages over categories?
WPBeginner Support says
Categories can group your posts while a page is normally for content that does not need to be updated often. You may want to take a look at our post here: https://www.wpbeginner.com/beginners-guide/what-is-the-difference-between-posts-vs-pages-in-wordpress/
Administratör
HARISH NEMADE says
Woww..Thanks a Lot, Wpbeginner Team.
WPBeginner Support says
You’re welcome, glad our article was helpful
Administratör
Evan Blass says
Hello,
I’m interested to know if there’s a way to make pages act as categories for SEO purposes. For example, if I create a new category ABC on my domain.com it will have this link, domain.com/categories/ABC. However, if I create a page with the slug ABC, it will have this link, domain.com/ABC. However, since it is not a category, search engines might treat it as a static page.
Is there a way I can convert the domain.com/ABC page to a category?
WPBeginner Support says
To customize the permalink, you would want to take a look at our guide here: https://www.wpbeginner.com/wp-tutorials/how-to-create-custom-permalinks-in-wordpress/
Administratör
Evan Blass says
Thanks let me check it out
Eleshia says
Hi there
A very useful tip regarding an important subject.
WPBeginner Support says
Thank you, glad you found our content helpful
Administratör
Vale says
Thank you for your post, so the pages still considered as static pages?
If I create an ”About” page and if I did not assign a category will continue to be static? And in the other hand make pages as post with content?
WPBeginner Support says
It should keep your pages as the static pages even if you add them to a category
Administratör
Ismail Siraje Ittembe says
Wow nice post boss keep it up
But This plugin hasn’t been tested with the latest 3 major releases of WordPress. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
WPBeginner Support says
Thank you for letting us know, we’ll be sure to take a look at alternatives should this plugin no longer work.
Administratör
Carolyn says
Hi. I am having a problem with assigning a new category that (for reasons over which I have no control) was given the same category name but with a different slug, and I am supposed to ’pull’ these objects to the new category. But because it has the same name, although a different slug, WP doesnt seem to differentiate and keeps slinging the files into the old category. It defaults to the original. If there were a global function, other than the categories plugin, so that I could select the files and reassign from one category to another, bcause when I try to do so, only the old one shows up (even though the new one clearly exists).
WPBeginner Support says
If you’re trying to rename the category, rather than transferring the posts individually you could rename the category: https://www.wpbeginner.com/beginners-guide/how-to-properly-rename-categories-in-wordpress/
Administratör
Viswanathan says
Hi, i am using the events manager plugin which creates individual pages for each event created. The plugin settings give an option of showing events as pages or posts. However in both the cases, while creating the event it only gives an option of adding or selecting an ’event category’ and not the ’categories that i create for my blog posts or pages.
Is there a plugin available so i can add my default post category to my events as well, so the events also show up in blog category archives?
Ghislain Poirier says
And how do we add the categories to the pages?
I have the category functions showing in the wordpress backend menu, but it is only a shortcut to the create new category section…
It is still not allowing me to tell what page is in what category or am I missing something?
Pranav Mohan says
This seems to assign pages to various categories, however, i am interested in finding out how to assign a category to a page so that when I search for the page, all the posts linked to the category show up.
Susan Taunton says
Hi WPBeginner!
Post Tags and Categories is flagged by WordPress now as not having been updated for 12 months and is only tested for up to WordPress version 4.5.13. I just wonder if there not a child theme functions.php addition that could accomplish making pages taggable? Or is there a more up to date plugin that accomplishes this?
Thank you so much for your many, many excellent tutorials.
Susan
Xavier says
Same question than Suzan.
I might use the php code for this feature in you have it by any chance.
BTW Suzan,
I found this plugin that might do the trick but I didnt test it myself and I would like WPBeginner opinion on that :
Category to Pages WUD
Hope this help
WPBeginner Support says
Hi Xavier,
It looks alright.
Administratör
Daan says
Is it possible to use slugs from the categories
/categories/pagename
mohit yadav says
Hi Thanks For This Great Article & the New Way of Website Structuring .
LOVE YOU
for this article.
Now What i m Looking is ?
i have a real estates website, while user submit property in this then he saw additional 3 drop down menu
1. by pages
2. by location
3. by type
and at last these automatically make a link with relevant pages.
THanks in Advance
Please help me .
Norma says
Hi, was super excited for this plugin but it didn’t work. It installed the categories but didn’t link them… I am so sad! Is there and up to date version?!
Carol says
I guess this info is outdated for the latest WP version. Is there an alternative plugin? I need to have this and it should be in WP by default, not requiring a plugin!
Complaints on the plugin’s site that their latest version does not work. When I do a search by different ways within my own plugin page for ’new’, ”no such plugin”.
WPBeginner Support says
Hi Carol,
No, the information and the plugin mentioned in the article still work perfectly. We have updated the article with new screenshots.
Administratör
Kegesa Danvas says
Maybe you should try a plugin called Category to Pages WUD
Jhasketan Garud says
Hi,
Thanks a lot. I just looking for this.
Now, I can easily affix categories to my new as well as old pages.
Jonathan Hostetler says
Thanks for this tip! I tried the plugin you recommended ”Post Tags and Categories for Pages” and it worked flawlessly. This is super helpful for me because we need to use pages (as opposed to posts) for certain projects because our visual editor plugin is only compatible with pages, but I also need to be able to assign categories to our content.
So, problem solved. Thanks again!
Sru says
How can i list the category names under each page.? Please advise
David says
This plugin has not been updated in 2+ years. Is there a way to do this without a plugin, so you’re not dependent on an old, outdated plugin?
Niso says
What is the difference between an old plugin and old code? I do not see any . difference.
Kayleen Peretto-Ortega says
Hello! I don’t have a plugin option, but there is an option for tags. I add tags for my posts, but they don’t appear on each post I make. Would you be able to help me on this?
WPBeginner Support says
Please see our guide on the difference between self hosted WordPress.org vs free WordPress.com blog.
Administratör
Tess Bulman says
Do you have to have the upgraded version of wordpress? I have the free version and it won’t let me do anything with plugins? If this is the case, is there another way to put tags on my pages?
Fabio says
Any info about compatibility with WordPress 4.4 ?
Renier says
@Fabio
I found some problems in WP4.4. For some reason none of the ’article posts’ in a category/post shows on archives (2016 theme). By deactivating obviously all ’article posts’ shows, but not ’article pages’ (or at least this is what I suspect). In short, archives doesn’t show all the pages.
Does anyone else experience this problem? I can’t seem to find any literature on the topic. Maybe Post tags and categories for pages plugin needs an update?
Tor Ivan Boine says
awesome! Weird that this needs a plugin
gerhard says
Very useful feature and a very good explanation on video!
thanks
Sebastian says
Hi,
has anyone managed yet to make these categories for pages appear in the URLs as well?
I have not found any way to do this. Without it this plugin is only half as useful.
Thanks for any suggestions!
Sebastian
Denis says
I have a question,
I have a website, and I do have categories pages, and TAG pages too,
Category pages are shown as 10 posts and they have next button – previous button,
But TAG pages don’t have NEXT BUTTON – PREVIOUS BUTTON, and they show only 10 posts related with the tag…
It is really crucial issue for me and I really need to have this TAG pages with next button, previous button
Do you guys have any idea that why CATEGORY pages do have these buttons but TAG pages don’t have?
How can I solve this issue?
Thanks so much in advance.
Best
Trieu To says
Hi, i want to add category to page-url example /%category%/%pagename% how can i modify it?
Can you post a artice about this?
Thanks
neotanvir says
I need a video which make it without using any plugins. Thanks
Tanuj Mandale says
is there a reverse of this,
I mean while creating a new post, instead of categories I want pages (to choose from). Means as a post is associates to category, it must associate to page.
Is it Possible, please reply.
thanks in advance
WPBeginner Staff says
Seems like products are a custom post type added to your site by a plugin or theme. This custom post type is not associated with tags. See our guide on Custom Post Types and Custom Taxonomies.
Ali Chaudhry says
Hi, im getting tag options for my posts but not for products, how to turn on tag option for products ?
Tiziano D'Angelo says
Do you know why the categories which are created are shared with posts? I’d like them to be page-only….
Leona says
Hi everyone, How do I take off the parenthesis and number of pages in front of each category. I am using it to categorize product for my online store and these don’t make sense. Thanks.
Shane says
Hi Guys,
Thanks for this info. Was wondering if this could be done.
Has anyone found that by adding categories to pages has increased rankings in Google if they also change permalink to – /%category%/%postname% ?
Cheers,
Shane
michello says
No, because the urls don’t change, I mean the category name does not show up in the url
So this plugin is half-baked.
Paul Adams says
Is there a way to force them to show up in URLs via functions.php?
Trieu To says
Hi Paul Adams
Like for this idea!
GILL COTTER says
ooh thanks… so useful x
bernice says
where should i post the coding at? do you had a guide? thanks
Mark Breese says
So, as you say, there’s a plugin for that… So is there a plugin… or shortcode that will let me show the pages with a certain category as a list of links… or maybe a list with excerpts and featured image? And I am using Ninja Page Categories and Tags plugin actually.
My theme has a short code for showing posts in a category, but it does not pick up the pages in category and show them. (the theme is Weaver II Pro)
Les says
I have to correct my first post. The categories used to appear on the right-hand side of the page.
Les says
SOLVED: I found out what the problem was. In the ”Screen Options” I had categories unchecked. I placed a check in the box and the categories are back.
Thanks for a great plugin.
Les says
My categories stopped showing on my add pages screen. They used to appear on the left side of the page. Even if I create a new page category, it won’t show up. Do you have any idea what could be causing this?
Thanks in advance.
chris says
Ignore previous comment. This is the correct one.
Hi. How can I show a listing of pages with their title/featured image/more?
Actually I only need the query to display a list of pages related to a category (pages I created and assigned them to a category) doesn’t seem to work. Instead, it brings only posts.
Editorial Staff says
In your query make sure you are searching for both post types: posts and pages.
http://codex.wordpress.org/Class_Reference/WP_Query#Type_Parameters
Administratör