Okay
  Public Ticket #3484124
Request for Assistance: Ensuring Unique Project Titles
Closed

Comments

  • Kirtan started the conversation

    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?

  •  390
    Ripul replied

    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;

    });

  • Kirtan replied

    How to download vibe projects version 1.2.3?

  •  390
    Ripul replied

    Replied in another ticket.