You can add default WordPress Categories and Tags taxonomies to Custom Post Types through passing taxonomies parameters to arguments. In previous article we had learnt how to create CPT using code in functions.php. Here I will explain how can you use WordPress default built-in taxonomies like Categories and Tags with those CPT.
Custom Post Types in WordPress is the feature which makes WordPress so popular content management platform. By default Post, Page and 5 others are post types available in WordPress. A few example of Custom Post Types are Portfolio, Project, Contact Form 7 or Products in WooCommerce etc.
I’m submitting a quite handy function to apply WordPress Pagination in Bootstrap 4 Style. This function contains First/Last, Previous/Next, Current and total number of pages. You can use the code for pagination in your Bootstrap 4 powered WordPress theme. It works with Custom Post Types and hides First/Last, Previous/Next texts on small devices (viewport width < 768 px)
The function below will assist you to smoothly add pagination in your WordPress theme using Twitter Bootstrap 3 pagination style. This function is easy to read and to customize as well as contains features like:
- Bootstrap Styling
- First and Last Button
- Previous and Next Button
- Current page & total number of pages
- First/Last text invisible on small devices
- Previous/Next text invisible on small devices
- Works with custom post types by passing parameters to function
Tags and tag cloud in WordPress are terms that quickly tell readers what a post is about and a useful way to group related posts together. A very few years ago I used to thought that tags are tricky things that are placed by bloggers to confuse people (:-D)! But soon I got familiarize with this one and so I thought to write a blog post to let readers and WordPress beginners to be familiar with tags and tag cloud.
Someday before I got a query for getting top parent category of a post.
Query was as following: I have a post, the post is in 3 categories. The category hierarchy is like so: Fashion => Men => Shoes
In WordPress, we use plenty of plugins, Some of these plugins require us to place a shortcode in the post, like [favourite_posts]. Shortcode may be a good way to add functionality on our site, but when we deactivate the plugin, the shortcode in the post content don’t get removed.
Wordpress users use shortcodes in the post content for integrating PHP or other type of code between the content and may be a good way to add functionality to the site. But sometimes we need for removing shortcodes from the post content from a specific page or specific post.
You can use Posts Viewed Recently Plugin to show the posts that are recently viewed by a visitor. This plugin supports custom post types and also provides shortcode to use the widget on any post or page.
You can know more and download this plugin via clicking the Continue Reading link given below: