bigspring / monolith

A starter theme for WordPress built with Twitter Bootstrap
MIT License
9 stars 1 forks source link

Post object inaccessible in content loop #294

Closed dmseaton closed 9 years ago

dmseaton commented 9 years ago

I noticed an issue here when trying to conditionally display the date based on $post->post_type - the $post variable isn't available. I'd have just used functional equivalents but $post->ID is already utilised on the page and results in an incomplete <article> block ID property.

We need to decide whether to use global $post in the builder/block or get_the_ID() in the article ID property.

juliotaylor commented 9 years ago

this seems like an urgent issue?

dmseaton commented 9 years ago

I reckon we should just use get_the_ID() in place of $post->ID, as the global post object isn't otherwise declared.

jrgmartin commented 9 years ago

I fixed this by making the $post variable available