星期日 , 8 11 月 2026

WordPress开发教程

WP开发者教程

9 月, 2024

  • 29 9 月

    WP如何添加自媒体链接

    首先我们要在后台用户面板添加自媒体链接的字段输入框,要用到的是 show_user_profile的钩子和edit_user_profile的钩子, <?php /*-----------------------------------------------------------------------------------*/ # Add user's social accounts /*--------------------------------------------------...

5 月, 2024

  • 23 5 月

    重磅:如何给单页添加验证邮箱的按钮,搜集邮箱

    HTML 部分 //首先在页面上添加一个按钮,点击弹出验证邮箱和弹出验证码: <p>产品图纸:<a href="javascript:void(0)" type="button" id="verifyEmailButton">点击进行下载图纸</a></p> //验证邮箱的form, 写在页面最底部 <!-- The popup form --> <div id="emailPopup" class...

3 月, 2024

  • 29 3 月

    acora主题安装到翻译教程

    安装主题 安装好wordpress之后,去外观,主题下面,点击新增主题,点击上传。 然后从下载的主文件里选择acora.zip这个文件,然后点击安装。 当文件上传好之后点击激活主题。 激活好主题之后,去后台,安装提示的所有插件。 然后再安装acora-child.zip 这个子主题。 安装演示数据 要用到All In One...

  • 19 3 月

    Git tutorial

    Certainly! Git is a powerful version control system that allows developers to track changes to their code, collaborate with others, and manage software development projects efficiently. Here's a comprehensive tutorial to get you started with Git: Table of Contents: Introduction to Git ...

1 月, 2024

  • 29 1 月

    关于query_vars的一些解释

    query_vars就是查询时候的一些参数,比方说你提交wp_query自定义查询的时候要设置cat名字 , 文章类型, tag名字等, 这些就是你发送wp_query请求时候附带的query vars, 这个query 查询所有满足变量条件的查询。 其他查询也是一样,打印出来的结果就是结果,而你代码上则是原因。 get_query_var 则是获取到query_v...

12 月, 2023

  • 28 12 月

    wp置顶文章只在第一页第二页还输出置顶文章的解决方案

    wp默认的置顶文章只在第一页置顶,超过第一页的话置顶文章依然还会存在他原来的位置上,要解决这种方法,让置顶文章一直都消失在第一页置顶的话,参考下面的代码进行输出: 或者直接用两个wp query分别输出 $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; // Fetch sticky posts separately $st...

  • 18 12 月

    WP rest api 文字教程

    概述 REST API 为我们提供了一种将 URI 与 WordPress 安装中的各种资源相匹配的方法。默认情况下,如果您启用了漂亮的永久链接,则 WordPress REST API “存在”于 /wp-json/。在我们的 WordPress 网站https://ourawesomesite.com`, we can access the REST API's index by making aGETrequest tohttps://ourawesomesi...

11 月, 2023

  • 30 11 月

    不用插件给WP图库画廊添加lightbox效果

    <?php /* * */ add_action( 'wp_footer', function(){ if(!is_admin()) { ?> <style> img { display: block; max-width: 100%; } .lightbox { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 999999; background-color: rgba(0, 0, 0, 0.75); display: flex; justify-...

  • 19 11 月

    测试文章类型

    I'm baby marxism bodega boys mlkshk 3 wolf moon food truck. Cred sriracha stumptown readymade put a bird on it, leggings umami pinterest thundercats Brooklyn vexillologist microdosing selvage meh. Neutral milk hotel edison bulb etsy hell of flexitarian stumptown paleo. Bodega boys gastropub lomo...

  • 19 11 月

    超级链接形式

    https://world.siteground.com/wordpress-hosting.htm?index_hero_button#view