Incomplete List of Post Types in Shortcode Options

Last Updated on

There are cases in which we need to select a specific post in a shortcode from a list of posts we have added previously in a custom post type, for example Employees.

Beware! Important Notice:
Before applying the workaround presented in this article make sure to have a Complete Backup of your website, so that if anything goes wrong you will be able to restore the website.

Incomplete List of Post Types

Due to technical reasons, we limited the listing of posts inside shortcodes to 30, and if you have more posts you will not see some of them in the shortcode listing.

Incomplete List of post types

To override such behaviors, you need to open up this PHP file via your FTP client:


Then change the code of the post listing number you want to increase. For example, to increase the Employees limitation, you need to do the following :

Open wp-content/themes/jupiter/components/shortcodes/mk_employees/vc_map.php
Find below lines:

"type" => "multiselect",
"heading" => __("Select specific Employees", "mk_framework") ,
"param_name" => "employees",
"value" => '',
"options" => mk_get_post_enteries('employees', 40),
"description" => __("", "mk_framework")
) ,

Change the number 40 to whatever you wish:

mk_get_post_enteries('employees', 60)

Beware! This change may affect the speed of your dashboard and the particular shortcode which you are using, as the system needs more resources to bring up all the posts into the list.
Was this helpful?

Related Topics

Previous Article:
Next Article:

Can't find what you're looking for?

Open New Ticket