Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • in reply to: No-title CPT permalink? #3791
    gospelnerd
    Member

    Aww.. sweet! It was the permalink flush I needed. Apparently just pressing ‘save’ on the Permalinks settings page didn’t do it? I had to change the link structure, then I just changed it back. Works now! Thanks again, Steve!

    in reply to: No-title CPT permalink? #3788
    gospelnerd
    Member

    That’s basically what I have, Steve.

    function set_cm_post_title($data, $post_array)
    {
      if ($post_array['post_type'] == 'cm-post')
      { 
          //set the title to [user_login]_[time()]
          global $current_user;
          get_currentuserinfo();  
          
          $post_name = $current_user->user_login . '-' . time();
          
          return $post_name;
      }
      else
      {
        return $post_array['post_title'];
      }
    
    }
    add_filter('piklist_empty_post_title', 'set_cm_post_title', 10, 2);

    This changes the title, but, the slug in the permalink is still ‘auto-draft-{n}’

    in reply to: No-title CPT permalink? #3761
    gospelnerd
    Member

    Well, that’s cool. I set the title to [user_login]-[time()] … but, the permalink is still auto-draft-{n} .. any way to hook it before the permalink gets created?

    in reply to: Permalink %tags% for post types? #3736
    gospelnerd
    Member

    Thanks Steve! After going through the guides and tuts a bit more, I’m not sure I actually need to do what I was thinking. But, if I did Caldera looks great.

Viewing 4 posts - 1 through 4 (of 4 total)