Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
Puchar WPB
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

Jak przełączać/konwertować własne typy treści w WordPress?

Uwaga redakcyjna: Otrzymujemy prowizję z linków partnerskich na WPBeginner. Prowizje nie mają wpływu na opinie i oceny naszych redaktorów. Dowiedz się więcej o Proces redakcyjny.

Szukasz sposobu na przełączanie lub konwertowanie własnych typów treści w WordPress?

Czasami możesz zdecydować, że dany typ treści nie jest odpowiedni dla twoich treści. Przejście na inny format może stworzyć lepszą strukturę organizacyjną witryny internetowej i poprawić twoją widoczność w wynikach wyszukiwania.

W tym artykule pokażemy, jak łatwo przełączać własne typy treści w WordPressie bez użycia jakiegokolwiek kodu.

Converting post types in WordPress

Dlaczego warto zmienić typ treści w WordPressie?

Typy treści to różne rodzaje treści, które możesz dodać do swojej witryny internetowej WordPress. Istnieje 5 domyślnych typów treści:

  • wpisy
  • strony
  • załączniki
  • wersje
  • menu

Możesz także łatwo tworzyć własne niestandardowe typy treści, aby lepiej organizować treści na twoim blogu. Można na przykład tworzyć własne typy treści, aby wyświetlać portfolio, referencje, produkty i inne.

Czasami jednak możesz chcieć zmienić twoją istniejącą treść na inny typ treści. Może to być pomocne, jeśli uważasz, że istniejący typ treści nie jest już odpowiedni.

Na przykład, jeśli twój blog WordPress zajmuje się recenzjami filmów i właśnie utworzyłeś dla niego konfigurator typu treści, to warto zmienić treść z „Wpisy” na „Recenzje filmów”.

Podobnie, jeśli masz na swoich stronach treści, które lepiej pasowałyby do wpisu na blogu, dobrym pomysłem jest zmiana typu treści, aby uzyskać lepszą widoczność w wynikach wyszukiwania.

W ten sposób nie tylko poprawisz komfort użytkowania twojej witryny internetowej, ale także pomożesz w organizacji treści, zaangażowaniu użytkowników i nawigacji po witrynie.

Powiedziawszy to, przyjrzyjmy się, jak łatwo przełączać lub konwertować niestandardowe typy treści WordPress.

Jak zmienić typ treści w WordPressie?

Najpierw należy zainstalować i włączyć wtyczkę Post Type Switcher. Aby uzyskać szczegółowe instrukcje, zapoznaj się z naszym przewodnikiem dla początkujących, jak zainstalować wtyczkę WordPress.

Po włączaniu wtyczka dodaje proste menu rozwijane do edytora bloków, które umożliwia przełączanie typów treści podczas edycji twojej treści.

Ponadto włącza również konwersję typów treści za pomocą opcji szybkiej edycji i działań zbiorczych, gdy zobaczysz wszystkie wpisy.

Przełączanie typów treści w edytorze bloków

Najpierw należy otworzyć stronę/post, aby zmienić typ treści w edytorze bloków WordPress.

Gdy już się tam znajdziesz, rozwiń kartę „Podsumowanie” z panelu bloków w prawym rogu ekranu.

Tutaj można powiadomić o nowej opcji „Typ treści” dodanej na dole karty. Wystarczy kliknąć odnośnik „Post” obok opcji „Typ treści”, aby otworzyć menu rozwijane.

Następnie wybierz własny lub domyślny typ treści, do którego chcesz przełączyć swoją zawartość.

Change post type in the block editor

Spowoduje to wyświetlenie na twoim ekranie komunikatu potwierdzającego.

Po potwierdzeniu zmian, typ treści wpisu zostanie natychmiast zmieniony w edytorze bloków.

Przełączanie typów treści za pomocą opcji szybkiej edycji

Można również szybko edytować typy treści za pomocą opcji Szybka edycja podczas zobaczenia wszystkich wpisów w kokpicie WordPress.

Najpierw należy przejść na stronę Wpisy ” Wszystkie wpisy z panelu bocznego administratora WordPress.

Alternatywnie, jeśli zmieniasz typ treści dla strony, przejdź do ekranu Strony ” Wszystkie strony z panelu bocznego administratora.

Gdy już się tam znajdziesz, kliknij odnośnik „Szybka edycja” pod tytułem wpisu lub strony.

Click the Quick Edit link under the post title

Spowoduje to otwarcie sekcji „Szybka edycja” wpisu, w której w prawym dolnym rogu pojawi się menu rozwijane „Typ treści”.

W tym miejscu wystarczy wybrać typ treści, na który chcesz się przełączyć, a następnie kliknąć przycisk „Aktualizuj”, aby zapisać zmiany.

Choose post type from the Quick Edit section

Przełączanie wielu typów treści za pomocą opcji działań zbiorczych

Możesz także zmienić typy treści dla wielu wpisów jednocześnie, korzystając z ustawienia Działania zbiorcze.

Najpierw musisz przejść na stronę Wpisy ” Wszystkie wpisy z panelu bocznego administratora WordPress. Tutaj wybierz wszystkie wpisy, w których chcesz zmienić typ treści na twojej witrynie internetowej WordPress.

Następnie wystarczy wybrać opcję „Edytuj” z menu rozwijanego „Działania zbiorcze” u góry. Następnie kliknij przycisk „Zastosuj”.

Choose the Edit option from the Bulk Actions dropdown menu

Teraz zobaczysz wszystkie wybrane wpisy w trybie „Edycja zbiorcza”.

Z rozwijanego menu „Typ treści” na dole wybierz typ wpisu, który chcesz zastosować do twojej treści.

Choose post type option from the bulk edit mode

Gdy już to zrobisz, nie zapomnij kliknąć przycisku „Aktualizuj”, aby zapisać twoje zmiany.

Bonus: Dodawanie własnych typów treści do głównego kanału RSS WordPressa

Po przełączeniu twojej treści na nowy, własny typ treści, będziesz chciał również przyciągnąć do niej ruch, umożliwiając klientom odkrycie kanału RSS dla treści.

Kanał RSS to kanał internetowy, który umożliwia użytkownikom otrzymywanie regularnych aktualizacji i powiadomień z wybranej witryny internetowej lub bloga.

Po dodaniu własnego typu treści do głównego kanału RSS WordPressa, sprawisz, że Twoje treści będą łatwo dostępne dla klientów. Poprawi to również SEO twojej witryny i usprawni proces zarządzania i dystrybucji treści.

Możesz dodać niestandardowe typy treści do głównego kanału RSS, dodając następujący niestandardowy kod do pliku functions.php twojego motywu:

function myfeed_request($qv) {
if (isset($qv['feed']))
$qv['post_type'] = get_post_types();
return $qv;
}
add_filter('request', 'myfeed_request');

Należy jednak pamiętać, że najmniejszy błąd podczas wpisywania tego rodzaju kodu może zepsuć twoją witrynę internetową i uczynić ją niedostępną.

Dlatego zalecamy korzystanie z WPCode.

WPCode - Best WordPress Code Snippets Plugin

Jest to najlepsza wtyczka do fragmentów kodu WordPress na rynku, dzięki której dodawanie własnego kodu do twojej witryny internetowej jest super bezpieczne i łatwe.

Zawiera również bibliotekę fragmentów kodu w chmurze, inteligentną logikę warunkową, kontrolę priorytetów kodu, bezpieczną obsługę błędów i wiele więcej.

Aby uzyskać więcej instrukcji, zapoznaj się z naszym poradnikiem na temat dodawania własnych typów treści do głównego kanału RSS WordPress.

Mamy nadzieję, że ten poradnik pomógł ci nauczyć się przełączać lub konwertować własne typy treści w WordPress. Możesz również zapoznać się z naszym przewodnikiem krok po kroku, jak wybrać najlepszy hosting WordPress lub naszymi najlepszymi wtyczkami WordPress, które pomogą rozwinąć twoją witrynę.

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.

Ujawnienie: Nasze treści są wspierane przez czytelników. Oznacza to, że jeśli klikniesz na niektóre z naszych linków, możemy otrzymać prowizję. Zobacz jak WPBeginner jest finansowany, dlaczego to ma znaczenie i jak możesz nas wspierać. Oto nasz proces redakcyjny.

Avatar

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

Najlepszy zestaw narzędzi WordPress

Uzyskaj BEZPŁATNY dostęp do naszego zestawu narzędzi - zbiór produktów i zasobów związanych z WordPressem, które każdy profesjonalista powinien mieć!

Reader Interactions

45 komentarzyZostaw odpowiedź

  1. 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!

  2. Jiří Vaněk says

    I would like to ask, if this new post type will have its own category on left menu on WordPress administration. That mean on left menu i have pages and posts now. Will I have this new post type as new category on wordpress admin left menu?

    • WPBeginner Support says

      If you are converting to a custom post type then it would depend on the custom post type as categories and tags can be enabled or disabled when creating them.

      Administrator

      • Jiří Vaněk says

        So basically, it is important to choose this option when creating a custom post type. I found it useful to have the articles separated by the left menu at the same time. Thanks

  3. THANKGOD JONATHAN says

    A greate article that explains what I have been finding hard to understand.
    However, I don’t know what is the revision post type is for. Please can you give me some idea about it?
    Thank you for the helpful post

    • WPBeginner Support says

      If your site has a revision post type, that is likely added via your theme or a plugin and it would depend on what added it to determine what it is used for.

      Administrator

  4. Moinuddin Waheed says

    Custom post type is a good way to organise the content in its proper place.
    it gives the flexibility to check a particular custom post type and make the required changes and updates whenever needed.
    having a custom post type slug I think improves seo performance and helps Google rank the website.
    I want to ask if we can have a sidebar navigation in the dashboard for custom post types as we do have for pages and posts?

    • WPBeginner Support says

      Custom post types should create their own sections in your wp-admin area similar to posts or pages :)

      Administrator

  5. David Eyler says

    This plugin is genius! Works great with the Blocksy theme for reclassifying Posts to Product Reviews –
    Yay thanks!

  6. Germans Frolovs says

    Can I deactivate the plugin after the procedure? In other words, will deleting the plugin force post types to switch back to the previous state?

    • WPBeginner Support says

      You can remove the plugin after changing the post types, they will not revert when the plugin is deactivated.

      Administrator

  7. Daniel says

    If I tried converting categories into tags with this plugin, would it also change the post category to the new created tag ?

    • WPBeginner Support says

      This is for modifying posts into pages or other custom post types. What you are asking about would be a different plugin.

      Administrator

  8. Tracy wilson says

    hi guys , thanks for your help. love the fact you follow up tutorial with written instructions. This is perfect for newbie like me. I am very excited this worked. You guys are amazing, I am now a lifelong fan and telling anyone who will listen how good you are. tx

  9. Suel Pratt says

    I just want to say thank you! This is the 3rd time im giving wp another try. I’ve been very frustrated with it in the past but thanks to your website and up-to-date video tutorials, I can finally have the wp site I’ve been dreaming of! Thank you!!!

  10. Brian says

    Shouldn’t the Post Type Switcher plugin be deacivated after this procedure, I’ve heard that there should not be more than five plug ins installed

    • WPBeginner Support says

      Hi Brian,

      No, it is a common myth. You can have as many plugins installed as you need. Just make sure those plugins are from reliable sources and recommended by reputable folks.

      Administrator

  11. Clifton Thrailkill says

    I am on the Premium Plan, and it does not allow plugins. How can I convert a page to a post without the plugin?

  12. Ting Ting says

    Hi,
    I just used this method on my page. But now the comment section is gone. How can I fix this?
    I hope you can help me, thanks!

  13. Mitch says

    How does this affect SEO? I do have Yoast Pro so I assume Yoast will 301 redirect it, but before I do this could you give me a little detail on what happens with the links?

  14. Stuart Mackey says

    I have a custom post type that didn’t put the „body” of the post in the same field as normal posts, so when I convert it the post is empty. Is there a way to „remap” this field from the old custom post ype to a normal post?

  15. Ujjwal says

    Hi,

    In my website I have few custom post types like Services, Professionals. The URL for these posts start as website.com/services/title-of-post.

    But there are some limitations in the options available with the custom post types. For example In normal post types, I can have a side bar, a menu bar, enable/disable author info etc. I do not have these options with the custom post types.

    So I plan to change the custom post types into normal posts and pages using a plugin. However when I do that, the plugin also changes the url of the post. For example from example.com/services/title-of-post to website.com/title-of-post

    Can you please advise of a way using which I can change the custom post type without the changing the url.

    • WPBeginner Support says

      Custom post type can have all the options you want. Please take a look at our tutorial on how to create custom post type in WordPress. If you are using Custom Post Type UI plugin, then edit your post type and under the advanced options you can enable support for different features. If you are using the code method to create your custom post type, then see other options section in the code on our tutorial.

      Administrator

  16. Jean says

    Hi WPBeginner,

    I was looking exactly that kind of post and thank god I found you… and hopefully the right plugin. Not sure if I can ask you this but here’s my issue:

    I have imported 20 different websites into 1. Out of 500 pages in the new website, 450 are pages, not posts. I need to convert all these pages into posts as the website template offers an incredible amount of options to posts but not pages. Also the developer says he can’t give the same rights to pages as posts as this would involve rewriting the template almost completely.

    I thus need to convert 450 pages into posts however my concern is the URL structure when I change from pages to posts. I’m afraid that it messes up all my internal linking.

    – What I’d like to know is if the plugin automatically rewrites or redirects to the right URL ?
    ex: /parentpage/thisisagreatplugin (page) becomes automatically /thisisagreatplugin (post) but what if I had another page links to /parentpage/thisisagreatplugin ? do I get a 404 page or does it automatically redirects.

    – When rewritten or redirected does it have a negative impact on SEO?

    Thanks so much for your answer if you have time,

    Jean

  17. WPBeginner Staff says

    Yes it is possible you can use a Permalinks structure with category name before the post name and then create a category called review and import your CPT into that category. One problem with this solution is that it will change URLs of all other posts as well.

    A better approach would be to setup a 301 redirect on your old URLs to let search engines know that the content has move to the new location.

  18. Severine C says

    Hi,

    thanks for this tutorial.

    I had to do it on a site using the WPML plugin, and it just didn’t work…

    If you use WMPL, you have to do an extra manipulation : go to the WP database, and in the wp_icl_translations table, change the element_type field for the post to convert ; for example, if you switch from a page to a custom post type named „Recipe”, change „post_page” to „post_recipe”.

    And to do it for a set of posts, here is the sql command :

    UPDATE `wp_icl_translations` SET `element_type`=replace(`element_type`,’post_page’,’post_recipe’) WHERE element_id IN (….)
    ;

  19. Joseph Herb says

    Thank you WP beginner editorial staff for this post. I am very frustrated for my clients’ this type requirement. First when he told about this type of customization I think how it possible? Then went to search for this issue and found your blog. I take deep breath. Post Type Switcher & Convert post types both plugins are very wonderful. You make me easy to solve this.

    Regards.

Zostaw odpowiedź

Dziękujemy za pozostawienie komentarza. Pamiętaj, że wszystkie komentarze są moderowane zgodnie z naszymi polityka komentarzy, a Twój adres e-mail NIE zostanie opublikowany. NIE używaj słów kluczowych w polu nazwy. Przeprowadźmy osobistą i konstruktywną rozmowę.