{"id":16492479,"date":"2023-02-21T18:32:23","date_gmt":"2023-02-21T18:32:23","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/custom-hook-3\/"},"modified":"2023-02-21T18:32:23","modified_gmt":"2023-02-21T18:32:23","slug":"custom-hook-3","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/custom-hook-3\/","title":{"rendered":"Custom Hook"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">So I&#8217;m trying to insert a hard coded block of html code into some pages on my Generate press site.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I wanted to hard code the html in an element as a hook, and then call the element when needed. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">There is a Hook option called Custom Hook, and you can name it. But I don&#8217;t see how I can call it up in the actual &#8220;Edit Page&#8221; on a page. <br \/><br \/>Would be nice if it could be called\/inserted when needed. I&#8217;m trying to avoid having to hard code in these lines of code every time I need this into the actual page&#8217;s code. That way, if I need to update the code later, I can change it in the element, and it updates across the entire site.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Thanks<\/p>\n","protected":false},"template":"","class_list":["post-16492479","topic","type-topic","status-publish","hentry","topic-tag-custom-hook","topic-tag-element","topic-tag-hook"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/16492479","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/16492479\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=16492479"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}