Site logo

[Support request] Is there any way to access “elements” with WP rest API?

Home Forums Support [Support request] Is there any way to access “elements” with WP rest API?

Home Forums Support Is there any way to access “elements” with WP rest API?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2589209
    gary

    Hi there,

    I am looking for a way to change the elements in generatepress through the WP rest api, is there any way?

    #2589752
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Elements are a post type like pages or posts, so you can access them by querying the gp_elements post type.

    I’m not sure of everything core allows you to do with posts and the API, but anything you can do with posts you should be able to do with Elements.

    Let us know if you need more info 🙂

    #2594970
    gary

    Hi there, thanks for the answer.

    Where do I exactly query gp_elements? I’m quite good with WP rest API but can’t find any good explanation on how to add stuff to gp_elements

    #2594984
    gary

    assuming its :{domain_name}/wp-json/wp/v2/gp_elements/{pageid} ?

    I’m trying to add stuff to field “content” but keep getting 200 repsonse and nothing is changing

    #2594991
    gary

    Got it working! The right field was “rendered”

    #2595466
    Tom
    Lead Developer
    Lead Developer

    Glad you got it sorted! 🙂

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.