Site logo

Enable masonry on other post types

Home Forums Support Enable masonry on other post types

Home Forums Support Enable masonry on other post types

Viewing 2 posts - 16 through 17 (of 17 total)
  • Author
    Posts
  • #114537
    Tara

    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

    #114640
    Tom
    Lead Developer
    Lead Developer

    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
    }
Viewing 2 posts - 16 through 17 (of 17 total)
  • You must be logged in to reply to this topic.