ThemeForest Check

Hi. I checked my theme for Theme-Check and Themeforest Check.

Here is an warning:

The theme uses the add_shortcode() function. Custom post-content shortcodes are plugin-territory functionality.

It means I can’t directly include the shortcode in theme?

Create a plugin, and in this includes your shortcodes . It’s very simple.
Create a php file with this header :

Plugin Name: Shortcodes Name Theme
Plugin URI:
Description: This plugin contains all shortcodes for my theme.
Version: 1.0
Author: Thezoc
Author URI:
Text Domain: shortcodes-mytheme
Domain Path: /shortcodes-mytheme

And in this php include all shortcodes.
Also in your theme use : tgm-plugin-activation . And says this plugin is mandatory.
Good luck .

1 Like

Thanks. I can do this, but I want to know if it’s allowed to integrate into theme?

1 Like

This is recommended, not just allowed!
Read here, especially posts by @Gareth_Gillman . I had the same problem two months ago.

Well, Thanks man.

1 Like