Skip to content

Instantly share code, notes, and snippets.

@phpmypython
Created April 24, 2016 21:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phpmypython/10dd54450e519bf7d2d52c6881181048 to your computer and use it in GitHub Desktop.
Save phpmypython/10dd54450e519bf7d2d52c6881181048 to your computer and use it in GitHub Desktop.
Accessing posts page data wordpress
<?php
if ( is_home() && get_option('page_for_posts') )
{
$blog_page_id = get_option('page_for_posts');
$header_image_id = get_field('header_image', $blog_page_id);
$image_id = wp_get_attachment_image_src($header_image_id, 'full');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment