我在WordPress中有一个简单的主题,我想在徽标和导航上方的网站标题中添加一行。
我知道需要编辑wp_bootstrap_navwalker.php但是我无法确定要使用哪些代码来实现这一点。该行将在我们的电话号码中右对齐。该网站是www.gpoint.co.uk。
任何帮助都会非常感激
答案 0 :(得分:0)
在您的子主题的function.php中添加以下内容:
add_action('template_redirect', 'add_phone_line');
function add_phone_line(){
// Loading just before rendering the template
$("header:first-child").prepend("<div class='phone'><p>Phone number: 1234567890</p></div>");
}