Skip to content

Conversation

@samdotme
Copy link

Allowing users to get access to featured images in posts is a simple two line change. This will simply return an empty string for those posts/themes which do not have/support a featured image.


foreach ( $rev_items as $item ) :

$post_id = url_to_postid( $item->url );
Copy link
Author

@samdotme samdotme Nov 15, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why the spacing is off here. I'm using Atom, and it's formatted perfectly. Same for below.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is because of tabs vs spaces

@mckernanin
Copy link

I don't understand the reason behind this. The plugin just adds endpoints for menus. Can you explain?

@samdotme
Copy link
Author

@mckernanin The use case for this would be someone building a modern, tiled menu layout. An example of doing this with posts or categories would be https://wordpress.org/plugins/wp-tiles/.

Exposing the featured image from the menu endpoint would allow a theme designer to get the same effect using a menu, which has the benefits of your tiles not having to change with every new post.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants