我需要從WordPress主父主題複製鉤子到子主題。如何從子主題禁用WordPress的父主題中的鉤子
如何禁用wordpress父主題中的鉤子並從子主題中調用它?
例如:
add_action('lr_header', 'lr_header_fnc');
我需要從WordPress主父主題複製鉤子到子主題。如何從子主題禁用WordPress的父主題中的鉤子
如何禁用wordpress父主題中的鉤子並從子主題中調用它?
例如:
add_action('lr_header', 'lr_header_fnc');
可能b?你不確定和回覆? –
感謝您的及時迴應。這樣做在我的孩子主題的functions.php實際上並沒有工作,否則我是否需要添加其他東西? – Rohan
這可以幫助你https://code.tutsplus.com/tutorials/a-guide-to-overriding -parent-theme-functions-in-your-child-theme - cms-22623 –
謝謝@ArsalanMithani我期待着它! – Rohan
無法弄清楚其實。有什麼建議麼? – Rohan