The best way to add the shortcode is to create a shortcode in your child theme functiuons.php file.
function footag_func( $atts ) { //Example
return "foo = {$atts['foo']}";
}
add_shortcode( 'footag', 'footag_func' );
You can refer to this document for WordPress shortcodes detail
https://codex.wordpress.org/Function_Reference/add_shortcode
Related Posts:
- How to create tabled index of posts in a certain category
- Omit specific product categories from WooCommerce shortcode
- Random post + categories + tags
- Shortcodes not working in category or tag description
- Create category post shortcode
- Shortcode interpreted as text
- get_posts() from parent category only using a shortcode
- I want to show category name when using [category] shortcode
- Portfolio Filter Buttons Wont Work
- How to choose the content from a post which is in the right category?
- Shortcode to display all the post from a category in a page
- Help to display the current categories and tags of a post
- Return all Tags and Categories in Separate List
- Show the parent taxonomy by creating shortcode in woocommerce?
- How can I display all products from all categories on one page with woocommerce?
- Post does not show category wish just show latest post
- in post content shortcode works, but hardcoded in same page template doesn’t?
- Displaying a Category on a WordPress Page
- display number of posts by category Shortcode
- Sorting Woocommerce products by category and attributes
- How to add featured image for category (without a plugin)?
- Category archive by year with permalink support /category/YYYY
- Create a category list page
- How do I use the same post slug for different Categories?
- How to display only 3 main categories, separated by commas, since they are marked in the post?
- Default WP Gallery – show only galleries of a certain category
- How to tax query X number of posts related by tag first, then by category if not enough in tag-related
- Woocommerce product categories order [closed]
- How do I create a way for users to assign categories to a post from the frontend?
- Exclude sub category posts from category display
- How to hide a specific category posts in my monthly archive?
- Give specific category its own permalink structure
- Automated adding of one tag to all the posts in a category
- How to set up sub-categories for author pages?
- Add category to custom post type automatically, using category slug
- Assign different category colours to different categories in the main menu
- Action hooks returning old category instead of new category
- Category checkboxes in upload modal
- wp_list_categories, Add class to all list items with children
- Using separator with wp_list_categories
- Connecting WordPress gallery to custom categories (taxonomy)
- How to mass-insert categories?
- Multi-site or categories?
- Why is get_the_category() saying that I have two categories?
- View the latest created categories
- If statement within PHP echo
- Custom sidebar on category pages
- category hierarchy level as a body class – parent cat =1, child cat=2, grandchild=3
- How to show author name only if the post is in a specific category?
- Are Category or Tag Archive Pages Possible?
- How to display only posts assigned to a particular, isolated, subcategory
- How to Exclude post from a category
- Hiding a Categories content on just the Homepage ‘Posts’?
- How to change a post category when the ACF datepicker Field is today
- Multiple Loops on category.php with pagination on last loop
- Category archives with monthly pagination
- Older entries link within category page
- Two separate portfolio pages [closed]
- List Child Categorie and hide the parent
- Child categories doesn’t echo if it doesn’t contain at least a post
- About title on a page
- Category url generate 404 error
- Style a category from category list
- Adding a page summary to a specific page
- Add a category on all archive category pages
- what file I need to create to work date archive links?
- Assigning certain pages or posts to use the template of the parent page or category
- Check for parent category
- I need advice on how to structure the categories according to the layout i have
- How to get posts using category slug in ClassiPress?
- Problem with wp_create_category
- Assign author to category and not only posts
- Product category display in tabs
- Sending all categories associated with a post to Google Ad Manager for use with .setTargeting
- Pull in an “Include” file based on a WordPress Category ID
- How to fetch common posts from two feeds?
- Why is URL Slug Saving Differently From How It’s Been Defined?
- How to set acf color field as background color to product category
- How to add all subcategories as submenu in WordPress menu
- echo $category[0]-> cat_name; shows only one category name
- How to noindex, follow a specific category wordpress?
- Category pages resolving with and without category prefix
- get taxonomy list in a page in the wordpress
- Is there a way to allow users to customize their feed view?
- Number of categories slowing down the site
- Change post category within pre_get_posts
- Subcategory Page 404ing
- displaying one category on one page
- Ajax Category add doesn’t update the list table custom column
- Question About Messing With Category Pages and Descriptions
- how to get postmeta info based on multiple categories?
- How to exclude category and post_tag taxonomy while displaying custom taxonomy?
- List Terms by category
- Add advertising box to a specific category page
- How to make 10 post of one category
- Listing category
- List products from current category
- Custom permalinks structure
- Weird html output of single_cat_title – is not inside of the html element?
- How to show posts of a specific category