Site logo

Archived topic

Enable masonry on other post types

16 replies · Started by Tara on May 31, 2015

Viewing posts 16–17 of 17

Do you mean unhook it with remove_action? In a plugin or in the theme? That's what I was originally trying to do in my child theme functions.php, but it didn't seem to have any effect there.

My post images are above the title. But don't worry too much as I've got a working solution now. It just feels a bit untidy having to split theme-related functions between the child theme and a custom plugin.

Thanks for all your help!

Tara

That's right, you can unhook it, and then hook your own function in - it should work in a child theme or your own plugin.

For example:

remove_action( 'generate_before_content', 'generate_blog_post_image' );
add_action( 'generate_before_content', 'generate_blog_custom_post_image' );
function generate_blog_custom_post_image()
{
      // Your function in here
}
This archived topic is closed to new replies.