高级自定义 - 布局

用户可以导航到:管理后台 > 网站管理 > 自定义布局,进行网站自定义布局的设置操作。

自定义布局功能可以让用户此处设计的内容(使用系统编辑器/页面设计器)按照用户所选择的布局设置,指定显示条件,用户角色对网站指定页面插入自定义内容。

点击“新增”按钮,即可进入系统编辑器新建需显示在自定义布局中的内容(可以在系统编辑器中点击“使用页面设计器编辑按钮”继续使用页面设计器来编辑内容),并在布局设置中选择此内容的显示条件。

布局设置

  • 顶部 Header 区域:此设计内容按条件显示于顶部 Header 区域。
  • 底部 Header 区域:此设计内容按条件显示于顶部 Header 区域。
  • 404 错误页:此设计内容按条件显示于 404 错误页。
  • 程序调用:此设计内容按条件显示于程序挂钩(Hook)调用处。

显示条件选项

可设置此自定义内容在什么条件和范围内显示,并支持多条件规则和排除规则设置。

支持的自定义显示条件选项:

  • 基本
    • 整个网站
    • 所有单数
    • 所有归档
  • 特殊页面
    • 404错误页
    • 搜索页面
    • 页面(博客/文章)
    • 首页
    • 日期归档
    • 作者归档
    • 商店页面
  • 文章
    • 所有 文章
    • 所有 文章 归档
    • 所有 分类目录 归档
    • 所有 标签 归档
  • 页面
    • 所有 页面
    • 所有 页面 归档
  • 我的模板
    • 所有 我的模板
    • 所有 我的模板 归档
  • 产品
    • 所有 产品
    • 所有 产品 归档
    • 所有 产品类别 归档
    • 所有 产品标签 归档
    • 所有 产品配送类型 归档
  • 邮件营销系统页面
    • 所有 邮件营销系统页面
    • 所有 邮件营销系统页面 归档
  • 特殊目标
    • 特殊页面 / 文章 / 分类,等等。

还可设置此自定义内容在哪些用户角色范围内显示。

支持的自定义用户角色显示选项:

  • 所有
  • 登录
  • 注销(未登录)
  • 用户角色
    • 网站管理员(Administrator)
    • 主任编辑(Editor)
    • 专栏作者(Author)
    • 投稿人(Contributor)
    • 订阅者(Subscriber)
    • 网店客户(Customer)
    • 网店经理(Shop manager)
    • 等等...

顶部 Header 区域

支持的自定义设置选项:

  • 悬浮:悬浮于浏览器窗口顶部(默认选中)。
  • 缩小:顶部通栏滑出后缩小。
  • 悬浮于:选择显示的设备
    • 桌面
    • 移动
    • 桌面+移动

底部 Header 区域

支持的自定义设置选项:

  • 悬浮:悬浮于浏览器窗口底部。
  • 悬浮于:选择显示的设备(默认不显示)
    • 桌面
    • 移动
    • 桌面+移动

404 错误页

自定义设置选项:

  • 禁用主顶部Header区域
  • 禁用底部Footer区域

程序调用

程序挂钩(Hook)调用支持一系列系统和应用的动作触发条件,来显示自定义的布局内容。

  • 顶部Head区域
    • html_before
    • head_top
    • head_bottom
    • wp_head
  • 顶部Header区域
    • body_top
    • header_before
    • masthead_top
    • main_header_bar_top
    • masthead_content
    • masthead_toggle_buttons_before
    • masthead_toggle_buttons_after
    • main_header_bar_bottom
    • masthead_bottom
    • header_after
  • 内容
    • content_before
    • content_top
    • primary_content_top
    • content_loop
    • template_parts_content_none
    • content_while_before
    • template_parts_content_top
    • template_parts_content
    • entry_before
    • entry_top
    • single_header_before
    • single_header_top
    • single_post_title_after
    • single_header_bottom
    • single_header_after
    • entry_content_before
    • entry_content_after
    • entry_bottom
    • entry_after
    • template_parts_content_bottom
    • primary_content_bottom
    • content_while_after
    • content_bottom
    • content_after
  • 评论
    • comments_before
    • comments_after
  • 边栏
    • sidebars_before
    • sidebars_after
  • 底部Footer区域
    • footer_before
    • footer_content_top
    • footer_inside_container_top
    • footer_inside_container_bottom
    • footer_content_bottom
    • footer_after
    • body_bottom
    • wp_footer
  • 商店 - 全局
    • before_main_content
    • after_main_content
    • sidebar
    • breadcrumb
    • before_template_part
    • after_template_part
  • 商店 - 橱窗陈列
    • archive_description
    • before_shop_loop
    • before_shop_loop_item_title
    • after_shop_loop_item_title
    • woo_shop_category_before
    • woo_shop_category_after
    • woo_shop_title_before
    • woo_shop_title_after
    • woo_shop_rating_before
    • woo_shop_rating_after
    • woo_shop_price_before
    • woo_shop_price_after
    • woo_shop_add_to_cart_before
    • woo_shop_add_to_cart_after
    • after_shop_loop
  • 商店 - 单个商品
    • before_single_product
    • before_single_product_summary
    • single_product_summary
    • after_single_product_summary
    • simple_add_to_cart
    • before_add_to_cart_form
    • before_add_to_cart_button
    • before_add_to_cart_quantity
    • after_add_to_cart_quantity
    • after_add_to_cart_button
    • after_add_to_cart_form
    • product_meta_start
    • product_meta_end
    • share
    • after_single_product
  • 商店 - 购物车
    • check_cart_items
    • cart_reset
    • cart_updated
    • cart_is_empty
    • before_calculate_totals
    • cart_calculate_fees
    • after_calculate_totals
    • before_cart
    • before_cart_table
    • before_cart_contents
    • cart_contents
    • after_cart_contents
    • cart_coupon
    • cart_actions
    • after_cart_table
    • cart_collaterals
    • before_cart_totals
    • cart_totals_before_order_total
    • cart_totals_after_order_total
    • proceed_to_checkout
    • after_cart_totals
    • after_cart
  • 商店 - 结账
    • before_checkout_form
    • checkout_before_customer_details
    • checkout_after_customer_details
    • checkout_billing
    • before_checkout_billing_form
    • after_checkout_billing_form
    • before_order_notes
    • after_order_notes
    • checkout_shipping
    • checkout_before_order_review
    • checkout_order_review
    • review_order_before_cart_contents
    • review_order_after_cart_contents
    • review_order_before_order_total
    • review_order_after_order_total
    • review_order_before_payment
    • review_order_before_submit
    • review_order_after_submit
    • review_order_after_payment
    • checkout_after_order_review
    • after_checkout_form
  • 商店 - 专注式结账
    • woo_checkout_masthead_top
    • astra_woo_checkout_main_header_bar_top
    • astra_woo_checkout_main_header_bar_bottom
    • woo_checkout_masthead_bottom
    • woo_checkout_footer_content_top
    • woo_checkout_footer_content_bottom
  • 商店 - 帐户
    • before_account_navigation
    • account_navigation
    • after_account_navigation