wordpress-theming - 在 site-nav.php 模板部分中包含 Gutenberg 的“搜索”块
问题描述
开发自定义子主题,我需要将 Gutenberg 搜索块添加到主导航。
我通过查看帖子表找到了该块的简码(?),不确定这是否有帮助:
<!-- wp:search {"label":"","placeholder":"Search...","width":100,"widthUnit":"%","buttonText":"Search","buttonPosition":"button-inside","buttonUseIcon":true,"className":"rhs-home-search"} /-->
是否有 WordPress 函数调用将此块包含在子主题中site-nav.php
?
我很确定这是一个米老鼠问题,但我似乎无法以一种获得相关搜索结果的方式来表达它。谢谢。
解决方案
推荐阅读
- javascript - 获取特定的 id/类(打字稿)
- java - 在 Spring AOP 中应用建议时,如何获取定义为切入点的方法的调用堆栈/调用者?
- python - PySpark:使用条件选择列的 Pivot / Flip 表
- magento2 - Magento 2:管理员端映射布局
- angular - 我无法使用 VS 代码终端创建 Angular 项目
- java - 如何在 SpringBatch 中获取另一个项目中编码的作业的状态?
- php - 如何在 Wordpress 中禁用某些 PHP 文件的缓存
- kotlin - Kotlin 优雅的变异 List 方法
三倍 - , 列表
, 列表 > - java - .NET Core 和 Java 之间的 Apache Ignite 二进制序列化不起作用
- r - 在 R 中运行 foreach 时写入文件会导致连接错误吗?