{"id":2371,"date":"2026-11-10T08:03:49","date_gmt":"2026-11-10T08:03:49","guid":{"rendered":"https:\/\/wiki.designcorner.co.ke\/?dc_term=hook"},"modified":"2026-11-10T08:03:49","modified_gmt":"2026-11-10T08:03:49","slug":"hook","status":"publish","type":"dc_term","link":"https:\/\/wiki.designcorner.co.ke\/?dc_term=hook","title":{"rendered":"Hook"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">What it is<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">WordPress has action hooks, which run code at set moments, and filter hooks, which change data before it is used. Plugins and themes use them to customise the site without editing core files.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why it matters for your business<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Hooks let developers add features safely, and your changes survive WordPress updates.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Real-world example<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A developer uses a filter hook to add a Kenya shilling symbol to every price in a WooCommerce shop.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Design Corner tip<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Ask developers to use hooks or a child theme instead of editing core or theme files.<\/p>\n\n\n","protected":false},"excerpt":{"rendered":"<p>A hook is a place in software where other code can attach itself to add or change behaviour.<\/p>\n","protected":false},"featured_media":0,"template":"","dc_letter":[13],"dc_topic":[33],"class_list":["post-2371","dc_term","type-dc_term","status-publish","hentry","dc_letter-h","dc_topic-wordpress"],"_links":{"self":[{"href":"https:\/\/wiki.designcorner.co.ke\/index.php?rest_route=\/wp\/v2\/dc_term\/2371","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wiki.designcorner.co.ke\/index.php?rest_route=\/wp\/v2\/dc_term"}],"about":[{"href":"https:\/\/wiki.designcorner.co.ke\/index.php?rest_route=\/wp\/v2\/types\/dc_term"}],"version-history":[{"count":0,"href":"https:\/\/wiki.designcorner.co.ke\/index.php?rest_route=\/wp\/v2\/dc_term\/2371\/revisions"}],"wp:attachment":[{"href":"https:\/\/wiki.designcorner.co.ke\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2371"}],"wp:term":[{"taxonomy":"dc_letter","embeddable":true,"href":"https:\/\/wiki.designcorner.co.ke\/index.php?rest_route=%2Fwp%2Fv2%2Fdc_letter&post=2371"},{"taxonomy":"dc_topic","embeddable":true,"href":"https:\/\/wiki.designcorner.co.ke\/index.php?rest_route=%2Fwp%2Fv2%2Fdc_topic&post=2371"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}