Add Markup and Item to Post-Loop


i haved tried to add an invisible post-img für responsive-height to the index loop. But i failed. Only one Image was recieved.

Anybody a solution?

// Add invisible responsive Image for height 
add_action( 'beans_post_image_append_markup', 'add_responsive_img' );

function add_responsive_img() { ?>
<?php }

Tanks and greets

Sorry, I don't understand your question completely. But in regards to your code snippet, beans_post_image() won't work if it is inside ?>beans_post_image()<?php.

Even with the PHP tags removed, your code will result in an error because the beans_post_image hook is part of the markup generated by beans_post_image(). You'll probably get a timeout or infinite loop.

Write a reply

Login or register to write a reply, it's free!