• Resolved utnalove

    (@utnalove)


    Hello,

    I have a template which has posts, pages (of course) and also Services and Testimonials post types.

    When I add/edit a new testimonial post type, the Custom fields box doesn’t appear.
    I need to add some custom fields, but I need to have such options in editing mode.

    The funcion/hook I want to add is working well in pages and posts. I need to add it also for testimonials.

    How can I make such box appear in Testimonials? See screenshot of a Page:

    View post on imgur.com

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    I’d use the plugin Advanced Custom Fields for this.

    Thread Starter utnalove

    (@utnalove)

    I prefer to do it manually in the theme. Since this theme doesn’t have updates anymore and I can edit it freely without using more plugins which increase vulnerabilities and slow down the site.

    Thus I’d like to know what I can change and where…

    • This reply was modified 6 years, 1 month ago by utnalove.
    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Add support for custom fields to your custom post type.

    Thread Starter utnalove

    (@utnalove)

    found!

    It was as simple as adding:

    add_post_type_support( 'testi', 'custom-fields' );

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to add custom fields to the wp-admin for custom posts’ is closed to new replies.