Types is a WordPress plugin that lets you easily create custom post types and add your own types of data to your website through the WordPress admin screen. You can also associate the content types with taxonomies and fields.
When you ask for help or report issues, make sure to tell us what you have created so far and what you want to achieve.
Viewing 15 topics - 1,231 through 1,245 (of 1,520 total)
Problem:
I want "Users" to be a Custom Post Types parent of another Custom Post Type "Sickness" (An user can have more than one sickness), but I am not sure about how this custom Post Type "Users" will relate to the native "Users" menu of WordPress. Solution:
There isn't such a feature within Types plugin, I suggest you try this:
1) Create a custom post type "Users", assign the author of each "Users" post as different wordpress user
2) Then you will be able to setup parent/child relationship between post type "Users" and "Sickness" Relevant Documentation:
Problem:
I'm using this shortcode to show an edit link to a CRED form
[cred_link_user_form form='111' form_name='Edit - business member' text='Edit %TITLE%' target='_self']
I"m getting a message "No user specified" instead of the link. Solution:
This is fixed in CRED 1.7, please update CRED to the latest version to fix the issue.
Problem:
How to limit a custom post type so that only one post of that post type can be created.
Solution:
The solution doesn't strictly prohibit the creation of additional posts, it simply hides the UI for adding new posts when a post of that type already exists.
Add the following to the theme's functions.php file, remembering to update the id of the existing post of that type and the slug of the custom post type, which in the example code is global-setting.
/**
* Custom code to hide UI to create >1 global-setting posts
*/
function disable_new_posts() {
$global_settings = get_posts( 'post_type=global-setting' );
if ( count($global_settings) != 0 ) {
// Remove sidebar link
global $submenu;
unset($submenu['edit.php?post_type=global-setting'][10]);
// Hide Add new button with CSS
// * change post id to id of existing post on next line *
if ((isset($_GET['post_type']) && $_GET['post_type'] == 'global-setting') || $_GET['post'] == 273) {
echo '%MINIFYHTMLb8a8432e92a03a7d02f4061d76fed79384%';
}
}
}
add_action('admin_menu', 'disable_new_posts');