Home › Forums › ACF PRO › have_rows('rows') not working in home.php › Reply To: have_rows('rows') not working in home.php
I’m assuming that you have the settings in WP set to show a static page for the home page and the blog index. The problem is that nothing on this page is going to have an effect on the blog index.
What you are going to have to do to get the values from that page is something like this.
$post_id = get_option('page_for_posts');
if (have_rows('rows', $post_id)) {
while (have_rows('rows', $post_id)) {
the_row();
// load data
}
} else {
echo “no rows loaded”
}
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.