Archived topic
Help with code for hook
3 replies · Started by Maria on May 27, 2020
I created a Page with a container block that I’d like to hook into the generate_before_footer_hook on my pages. What PHP code would I need to do this? page-id-1200
Hi there,
Not sure if I fully understand.
What code are you trying to add?
Have you tried using the display rules in the hooks element?
I'm trying to hook content into the generate_before_footer_hook area. I created the content in a new page (page-id-1200). A container block, background image, grid, icons. I want to insert that "block" in my pages using the generate_before_footer_hook. Isn't there a function that would get the page? I don't know how to write the function.
function get_page( $page, $output = OBJECT, $filter = 'raw' ) {
return get_post( $page, $output, $filter );
}
Hi there,
we're working on an update for GPP 1.11 which will allow you to do that.
Currently - although you can do it with code, it will not import the blocks styles....