dqellle310167 2018-06-20 08:52
浏览 78

在Wordpress标题中插入H1(标题)上方的块

I am trying to insert a block above the Title in Wordpress using hook add_action in functions.php. But it displays above all blocks, even above the main menu.

add_action('wp_head', 'my_function_name');

function my_function_name(){
  ?>
    CODE OF BLOCK
  <?php
};

How to modify the code to make the block displayed above the H1 (title of the article)?

  • 写回答

1条回答 默认 最新

  • doumuyu0837 2018-06-21 10:47
    关注

    The problem was solved using this code:

    add_action('presscore_before_main_container', 'my_function_name'); function my_function_name(){ ?> CODE OF BLOCK <?php }

    评论

报告相同问题?

悬赏问题

  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
  • ¥15 Vue3地图和异步函数使用
  • ¥15 C++ yoloV5改写遇到的问题
  • ¥20 win11修改中文用户名路径
  • ¥15 win2012磁盘空间不足,c盘正常,d盘无法写入
  • ¥15 用土力学知识进行土坡稳定性分析与挡土墙设计
  • ¥70 PlayWright在Java上连接CDP关联本地Chrome启动失败,貌似是Windows端口转发问题
  • ¥15 帮我写一个c++工程
  • ¥30 Eclipse官网打不开,官网首页进不去,显示无法访问此页面,求解决方法
  • ¥15 关于smbclient 库的使用