Custom Fields
Re-Envisioned
Support Meta Box Builder Set post title automatic by value of dropdown list of selections of posts

This topic contains 1 reply, has 2 voices, and was last updated by  Anh Tran 2 months ago.

  • Creator
    Topic
  • #14966
    Resolved
    designerabreu@gmail.com
    Participant

    Hello, any way to set the title of the post a value of a posts selection box?

    I have a custom post with a field with post selections from another post type.

    Example:
    A Post_type called “BASE” with some defined posts: TITLE A, TITLE B, TITLE C, TITLE D …

    The other type of post called “SUPER” contains a box of selection of posts with the posts of “BASE” posts.

    The idea is that the new post has the same title of selection post.

    In the “SUPER” post, selecting “TITLE A”, when saving the post, set the title of the post with “TITLE A”. Slug does not matter that it is sequential, because there will be many posts with the same post_title.

    Thank you for your help

Viewing 1 replies (of 1 total)
  • Author
    Replies
  • #15017

    Anh Tran
    Keymaster

    I’m afraid the value stored for the post field is always post ID. I suppose you’re trying to set title with a custom code. I’d suggest you add a little code to retrieve the post title from the post ID and then use that title later in your code.

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.