Types plugin lets you easily create relationships between different post types and connect them using GUI controls. You can also connect multiple post types and build many-to-many post relationships.
When you ask for help or report issues, make sure to tell us what you have created so far and the structure that you want to achieve.
Viewing 15 topics - 691 through 705 (of 792 total)
The issue here was that the user was getting the error.
PHP Fatal error: Can't inherit abstract function Types_Interface_Value::get_value() (previously declared abstract in Types_Field_Part_Interface) in /var/www/html/wordpress-multisite/wp-content/plugins/types/application/models/field/part/option.php on line 8,
Solution:
This issue was actually resolved in our Latest version of Types and I would recommend that you update to this version.
Problem: I would like to upgrade to Toolset 3 and post relationships. How should I do it?
Solution:
1. Set up an exact copy of the current site you have (staging site, so to say)
2. Update there to the latest Toolset
3. Head to Toolset > Relationships and press the button to migrate the site to Types 3.0
4. Complete the wizard and contact us in case it tells you to do so and you are not 100% sure the topic it mentions is fully clear to you
5. Enjoy the new features and contact support if necessary.
Problem:
How to translate relationships with WPML?
Solution:
Generally, You should always start by creating related content in the default language. Then, translate the posts that you have connected. You do not need to maintain connections between translations.
Problem: I have two custom post types in a parent / child relationship. They are Restaurant (parent) and Location (child). I would like to show a custom search View that filters by the taxonomies applied to the parent posts, and I would like to show the matching Location results on a Map.
Solution: Create a View of Locations, filtered by post relationship, where the parent post is set by the current post in the Loop. In the Loop of the View, insert the Map Marker shortcode.
Create a View of Restaurants, filtered by the various taxonomies you want to show in a custom search. In the Loop Editor, insert the View of Locations in the wpv-loop tags. Add the Map shortcode outside the wpv-loop tags.
Problem: I would like to add a column to the post list in wp-admin menu for a custom post type. In that column I would like to display the number of child posts in a specific post relationship.
Solution: Custom code is required to do this.
/******************************
** Adds post relationship column to salons table
******************************/
add_filter( 'manage_edit-salons_columns', 'my_edit_salons_columns' ) ;
function my_edit_salons_columns($defaults) {
$defaults['child'] = 'Child';
return $defaults;
}
/******************************
** Adds data to the post relationship column in salons table
******************************/
add_action( 'manage_salons_posts_custom_column', 'my_manage_salons_columns', 10, 2 );
function my_manage_salons_columns($column_name, $post_id) {
if ($column_name == 'child') {
$children = toolset_get_related_posts(
$post_id,
'salons-shops',
'parent',
1000000,
0,
array(),
'post_id',
'child'
);
echo sizeof($children);
}
}