Skip to main content
12 events
when toggle format what by license comment
Oct 16, 2022 at 12:10 vote accept Arafat Jamil
Oct 15, 2022 at 14:57 comment added Arafat Jamil Let us continue this discussion in chat.
Oct 15, 2022 at 14:57 answer added Arafat Jamil timeline score: 0
Oct 15, 2022 at 11:24 comment added Arafat Jamil I think I have found a new approach. It is setting up two custom fields, and set the title by concatenating the metaboxes. I am working on it, if it works, I will post it as a solution.
Oct 15, 2022 at 2:29 comment added Sally CJ "If I can split the title, I won't need to work on the slug separately" - what do you mean by that, and what is the actual problem here that you're trying to solve? Are you saying that the title will always be the author's name (first & last) that's gonna be typed in manually, and when the post is saved, you want to split the title, and then auto-fill the first and last name fields/meta? If so, what's the point of having the first and last name fields?
Oct 14, 2022 at 19:33 comment added Arafat Jamil I have already created a post type. I have also added meta boxes for other fields which were necessary. But If I can split the title, I won't need to work on the slug separately. If I take first and last name differently, I will need to change the slug again. Is there any way to split the title, may be in two parts of a form, and a third hidden field to connect the value of those two, before it is sent to database?
Oct 14, 2022 at 16:53 comment added Sally CJ Well by default, if the post title is John Doe, then WordPress will use john-doe as the post slug that's used in the permalink. As for creating the authors post type, you can use register_post_type(), and there are generators like this that you can quickly try. As for the first/last names, you can add them either as custom fields or terms in a custom taxonomy.
Oct 14, 2022 at 15:54 comment added Arafat Jamil Authors, is a custom post type that I will build myself, it is not related to WordPress roles directly. You can think of this as a profile storage system, for example, you can consider a list of Employees. And I want to split the title with 2 different labels, First name and Last name.
Oct 14, 2022 at 15:39 comment added Sally CJ So you mean, a full permalink URL would look like https://example.com/first-last/ (no base), or is it like https://example.com/authors/first-last/ (base is authors)? What are these authors - authors of what? And as for splitting the post title, are you sure the author's name will always be first last and not last first or first middle last?
Oct 14, 2022 at 11:14 comment added Arafat Jamil My targeted approach is to split the 'Title' field into two parts, that will create the first name and last name fields. If you have any idea, you can respond of course.
S Oct 14, 2022 at 11:12 review First questions
Oct 20, 2022 at 18:16
S Oct 14, 2022 at 11:12 history asked Arafat Jamil CC BY-SA 4.0