You can use the register_taxonomy_for_object_type
function.
The following adds the default ‘tag’ and ‘category’ taxonomies to pages:
register_taxonomy_for_object_type('post_tag', 'page');
register_taxonomy_for_object_type('category', 'page');
Related Posts:
- Theme Check gives: Required: This theme doesn’t seem to display tags?
- How do I hide tags that have only been used once?
- How to check if post has any tag?
- Is there an error in get_the_tag_list()?
- What are the Theme tags in style.css used for?
- Any tag pagination page (except the 1st page) loads index.php template instead of tag.php
- What tags should be used for themes to show the type of layout?
- Using wp_tag_cloud(‘format=array’) to print tag names without links?
- How can I wrap html around the output of the_time function?
- Force Balance Tags not working
- Tag Page Not Listing All Posts With Tag
- Why tags are displayed bellow the content and not inside
- Get Post’s Excerpt Without the Wrapping tags and the Read More link
- Why Tags don’t appear in my page?
- Twentytwenty theme p-tags break em- and strong-tags that span several paragraphs
- Displaying Tags for the Page I’m On?
- Get the first image from post content (eg.: hotlinked images)
- Getting failure when using filemtime() with wp_enqueue_style
- Is it possible ( or advisable) to allow open access to the new theme customizer for potential clients?
- How bad is it if I write AJAX functions using wp-load.php?
- How to know if a child theme is being used?
- How to modify an image block in Gutenberg WordPress 5?
- wp_nav_menu sort order?
- How do I show sticky posts on a static front page that also contains content?
- Make a custom theme translate-ready
- Grab the first paragraph of each post
- Wrapper class: How to get rid of call_user_func_array() warning?
- Change Genesis Tag from Page Template [closed]
- How to Handle CSS for Multiple Header header.php Files?
- Why is save_post triggered even when I havent saved the post
- Add custom field automatically to custom page types
- Adding WordPress colorpicker in widget settings
- What is wrong with this code I have to make a blockquote shortcode
- Add social icons in a theme through custom admin menu
- file_get_contents Not allowed in Themes?
- Best approach to create sites with Modular Content? [closed]
- How to attach different React Components to different Dom Roots using the new WP wordpress/scripts webpack/babel
- front-page.php is not Listing in Static Front Page List
- Is it necessary to prefix every css class in a theme framework?
- Warning/Error in Admin Panel while developing theme
- How do I get the next page of posts link?
- display 20 lines only with the_content
- How do I remove twentyten without ruining what I did?
- Custom theme not visible in Appearance
- Where can I access my custom page template?
- How to display posts in hyperlink with nested slugs?
- How to To Filter wp_enqueue_script() Scripts on Some Pages
- Does WordPress theme customisation API support section hierarchy?
- Check if tag, category or author on archive.php
- Editing Footer Information
- How does a mobile WordPress theme differ from a simple theme?
- Developing WordPress Theme using CSS framework like Bootstrap
- Add “Delete” button to my Theme
- Disable dashboard drag&drop
- nothing happen in search form
- Catagories to the list of the titles in that catagory to the content of the post [closed]
- How to customize output of plugin
- Override customizer values on a per-menu base
- Theme Inspector “X-Ray”
- WordPress Theme Creation [closed]
- In creating a theme, how can i allow a user to change an image outside post/page content?
- What Does “Cannot modify header information?” Mean
- Is there any solution, ide/tool etc., for automatic escaping for WordPress?
- What template file is used for homepage pagination?
- WordPress theme resource won’t load over VPN
- Templates without a loop, best practice?
- How the redirect_to parameter is added to wp_login.php when trying to access wp-admin?
- Converting a static HTML template into a WP theme – How do I specify page content?
- Shortcode call not working in WP Template
- Unwanted empty line at the beginning of document
- Why is my container argument not working for wp_nav_menu() [closed]
- Translate a theme with a PO file
- All pages are the same
- How can I get the featured image or the first image for a post/page and display it as a banner?
- How to Split loop in multiple column in archive page
- Auto focus RichText field
- How to create nested array attribute
- Warning: This page allows direct access to your site settings. You can break things here. Please be cautious!
- Customizer API Multi Sections in single Panel
- How can i Limit My Wp Theme To Only One Site
- add class to all images inside the content
- How to get next post and previous post URL in loop, single.php My WordPress 4.9.6
- Creating a theme just to deploy a single page
- Load multiple css simultaneously using functions.php
- bbPress: modifying template for forum index
- control posts order by select option
- Nav menus Fast previewing not working with wp_get_nav_menu_items!
- Load get_page_templates into select menu
- Weird ‘theme update’ error [duplicate]
- how to make a new page affected by a theme’s index.php layout?
- How to display only some widgets of a sidebar?
- Theme Options Doesn’t Work On WP Multisite
- WordPress two sidebar layout or theme
- add_action not working in header?
- Custom Infinite-post-scrolling in a custom theme:
- Alternating CSS classes for dynamic content [closed]
- Recent posts with comment count in “Sidebar” template [closed]
- HTML to WORDPRESS [closed]
- Isotope overlapping .items because of featured images – HELP! [closed]
- Is there any halfway decent documentation on the wp.media JS class?