HTML 部分 //首先在页面上添加一个按钮,点击弹出验证邮箱和弹出验证码: <p>产品图纸:<a href="javascript:void(0)" type="button" id="verifyEmailButton">点击进行下载图纸</a></p> //验证邮箱的form, 写在页面最底部 <!-- The popup form --> <div id="emailPopup" class...
Read More »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...
Read More »wp编辑器关闭smat quote功能实现 引用号正常
wp自带编辑器有smart quote功能, 要关闭wptexturize。 WordPress 使用 wptexturize()函数 转换 ' 到 ’, ‘, 或取决于上下文的其他实体. 比方说会将let's 转换成 let' s 符号后面有空格符号形式也会转变, 所以要在钩子中去除掉这个函数 remove_filter('the_content', 'wptexturize'); remove_filter('the_title', 'w...
Read More »如何给自定义表导入另外一个数据库的表的部分字段
比方说其他类型网站的数据库的表里有很多没用的字段,你在wordpress里的表单的字段去除了很多没用的字段,但是部分字段都还是重叠的状态,所以要确保被导入的表的字段符合要导入的表的字段,不然无法导入; 确保两个数据库相邻,去mysql后台运行sql命令: -- Make sure you're in the WordPress database USE you...
Read More »SQL替换
I understand - you want to go the opposite direction and replace relative URLs with absolute ones. Here's the SQL command to do that: sqlCopyUPDATE wp_posts SET post_content = REPLACE( post_content, 'wp-content/uploads/', 'http://mydomain.com/wp-content/uploads/' ) WHERE post_c...
Read More »VSCODE 扩展
Here are some of the most useful extensions for VS Code for web development, categorized based on your needs: PHP Extensions: PHP Intelephense Provides powerful auto-completion, IntelliSense, and code navigation for PHP. PHP Debug Debugging PHP code with Xdebug directly in VS Code....
Read More »Canva slider
https://www.canva.com/design/DAGc1iNJKzk/KSvQWmQYoibx6IWoxDInEg/view?utm_content=DAGc1iNJKzk&utm_campaign=designshare&utm_medium=link2&utm_source=uniquelinks&utlId=haa3e9ef37f
Read More »wp给菜单添加字段并控制二级菜单的输出方式wp nav menu class 教程 mega menu 教程
菜单也是wp_post的对象,首先给菜单添加字段: 添加字段: add_action('wp_nav_menu_item_custom_fields', 'add_mega_menu_type_field', 10, 4); function add_mega_menu_type_field($item_id, $item, $depth, $args) { $mega_menu_type = get_post_meta($item_id, '_mega_menu_type', true); ?> ...
Read More »carbon fields插件
Recommended Plugins Members (by MemberPress) Features: Allows you to create and manage roles and capabilities. Restrict access to posts, pages, or custom taxonomies (like categories). Integrates seamlessly with custom categories. How to Use: Install and activate the plugin. ...
Read More »All in one无限制上传插件扩展
在wp-content下面新建ai1wm-backups文件夹,将备份文件上传,然后在管理面板里面点击backup,点击三个点,然后点击restore. 这个插件提示要更新点击下更新即可。 点我进行下载
Read More »WP如何添加自媒体链接
首先我们要在后台用户面板添加自媒体链接的字段输入框,要用到的是 show_user_profile的钩子和edit_user_profile的钩子, <?php /*-----------------------------------------------------------------------------------*/ # Add user's social accounts /*--------------------------------------------------...
Read More »Javascript面向对象OOP基础知识
面向对象编程(Object-Oriented Programming, OOP)是编程中的一种思想和方法论,主要通过“对象”和“类”来组织代码,以提高代码的可维护性和可重用性。JavaScript 作为一种多范式编程语言,也支持面向对象编程。以下是 JavaScript 面向对象编程的基础知识: 1. 对象 对象是 JavaScript 中的基本数据结构之一。它由...
Read More »