首先去framework文件夹或者inc文件夹添加widget.php文件,然后初始化widget: <?php /** * Register widget area. * * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar */ function codeblog_widgets_init() { register_sidebar( array( 'name' ...
阅读更多 »Recent Posts
WP如何不用插件创建多语言网站保姆级教程
下面的方法还是有不少的局限,要手动实现的方法,用Polylang免费插件来手动添加每个语言的文章内容就好。 开发一个WP的多语言主题要求部署国际化i18n和本地化l10n,下面是完整的过程: 1:主题结构 首先组织你的主题结构来启用多语言支持: your-theme/├── languages/│ ├── theme-name.pot│ ├── theme-name...
阅读更多 »How to make a multi-language WordPress theme
Developing a multi-language WordPress theme without plugins requires implementing internationalization (i18n) and localization (l10n) directly in your theme code. Here's a comprehensive approach: 1. Theme Structure Setup First, organize your theme with language support in mind: your-the...
阅读更多 »
WP开发教程 WordPress导师在线教程