Contact Page REST API

Hi, I want to take Contact Page information from Wordpress REST API V2, but when I call contact page like http://mywebsite/wp-json/wp/v2/pages?slug=iletişim, it will return contact.php but it does not include any information about contact info like address, phone number, etc. Because I used your contact page in my web site.Also I attached image about this problem. 
Screen Shot 2018-06-05 at 10.39.13.png
148K

Comments

  • edited June 2018

    Try to fetch the option values of appointment_options. In this, you will even get the values related to contact. Contact template using the option values of the appointment_options to display contact page(having contact template).

    So, try for the below code to fetch contact details:

    $appointment_options=theme_setup_data(); 
    $contact_setting = wp_parse_args(  get_option( 'appointment_options', array() ), $appointment_options );

    Thanks
  • Thank you for your attention, please give me an example how can I call appointment_options using Rest Api ? Because I do not know where I have to add this code on your template 
  • edited June 2018
    Hi, @caglarturkurka

    Sorry!  your query is related to Rest API and it does not come under the theme support. This query is a part of development.

    Please query us related to the theme issues. Our Support team enables to assist the queries related to the theme issues/configuration.

    Thanks for contacting us :)
Sign In or Register to comment.