Support

Account

Home Forums Front-end Issues Get fields from all posts

Helping

Get fields from all posts

  • Hello!
    Please help me.
    I have many posts with field name “model”. I need to get fields from all posts to page.
    I use this:
    <?php the_field('model', 281); ?>
    281 – is ID post, but i need to get this from all created and will create post
    like this:
    – model-X3355 (<= with link to the post)
    – model-A2342 (<= with link to the post)
    – model-M8385 (<= with link to the post)
    ….
    Thanks a lot

  • Hi,
    Try to use the wordpress get_posts() function, then get the fields values for each posts and then you can display the links.
    Hope this help

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Get fields from all posts’ is closed to new replies.