【问题标题】:best method to create tables in wordpress themes [closed]在 wordpress 主题中创建表格的最佳方法 [关闭]
【发布时间】:2021-12-28 18:00:02
【问题描述】:

如果我想在使用我的主题时在 wordpress 中创建自定义表格并在主题被删除时删除这些表格,那么最好使用哪个操作挂钩

【问题讨论】:

标签: wordpress wordpress-theming


【解决方案1】:

你可以在functions.php中创建你的函数来创建表,并将它挂在“after_switch_theme”钩子中。

例如:

add_action("after_switch_theme", "{enter the name of your create table function here}");

【讨论】:

    猜你喜欢
    • 2012-01-15
    • 1970-01-01
    • 2015-06-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-08-05
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多