I've come across a specific functionality that I would like to implement. I understand that each project has a title, but I would like to ensure that all project titles are unique.
I wanted to reach out to you to inquire whether it is possible to achieve this unique project title functionality within the current theme. If it's feasible, I would appreciate any guidance or assistance you could provide on how to implement it. Alternatively, if this requires manually, could you kindly let me know which file(s) I should be looking at or which code modifications I need to make to achieve this goal?
I've come across a specific functionality that I would like to implement. I understand that each project has a title, but I would like to ensure that all project titles are unique.
I wanted to reach out to you to inquire whether it is possible to achieve this unique project title functionality within the current theme. If it's feasible, I would appreciate any guidance or assistance you could provide on how to implement it. Alternatively, if this requires manually, could you kindly let me know which file(s) I should be looking at or which code modifications I need to make to achieve this goal?
This is possible. Although WordPRess internally takes care of the slug, but 2 project of same title can be created.
In vibe projects verison 1.2.3 this filter:
vibe_projects_create_edit_project_args can be used to get the uniqeness of the project.
add_filter('vibe_projects_create_edit_project_args',function($args){
//$args['post_title']; contains the title of the project
if(empty($args['ID])){ // New project
if(!empty( get_page_by_title($args['post_title'], 'object','project'))){
return []; //return blank would fail project creation
}
}
return $args;
});
How to download vibe projects version 1.2.3?
Replied in another ticket.