WordPress极简主题-buling 预览
上次有人说博客好丑,我仔细看了看,确实挺丑的/撇嘴。这一年来发现审美也有提高,很喜欢极简风格的事物,可是创造对我来说难度还是挺大,昨天中午搜了一下wordpress主题,知乎有:有哪些好看的极简的 WordPress 主题?,顶楼提供了自己博客,我看了一下,确
上次有人说博客好丑,我仔细看了看,确实挺丑的/撇嘴。这一年来发现审美也有提高,很喜欢极简风格的事物,可是创造对我来说难度还是挺大,昨天中午搜了一下wordpress主题,知乎有:有哪些好看的极简的 WordPress 主题?,顶楼提供了自己博客,我看了一下,确实很漂亮,之前apple官网也用了类似线条来描述,但楼上不开源,唉,这….。
还好我们有微创新,其作用在于把别人好的东西抄过来发扬光大,这不,现在的主题(buling,姑且叫这个名字)出来了,这个主题是基于 chitose 更改过来的,基本没有原主题的特点了。
主题对不同屏做了适配,主要针对 大显示器/pad/手机浏览三种
目前主题设置包括如下几项:
1、影藏右边栏。隐藏掉也挺好看的
2、文章列表支持只显示N字长的摘要
3、页脚统计代码或备案信息等。
看到的表象就这么多了,主题由于是花昨天下班时间和今天中午午休时间赶出来的,所以肯定还有很多BUG,比如兼容性,我看了一下IE7还算正常,IE6就算了,我就不打算去支持了。so…现在还没有正式的主题供大家下载使用。
——————————–技术分割线—————————————
这也是第一次去学习wordpress主题开发,其中也涉及到很多api的使用,已经主题的一些设置配置信息,比如这篇文章:zh-cn:主题开发 这网站文章还是很不错,但访问速度实在是难受极了。
一、设置主题信息
在style.css中头部添加如下信息
View Code CSS
/* Theme Name: buling Theme URI: http://www.mjix.com/archives/1417.html Author: buling Author URI: http://mjix.com Description: 从chitose主题更改,铃不铃极简风格! Version: 1.0 */
二、设置主题预览图
截图screenshot.png放在主题根目录
三、设置主题相关信息
主题设置代码直接写在functions.php
View Code PHP
//设置主题相关信息 update_option('buling_key', $_POST[$opt]); //获取主题相关设置 get_option('buling_key'); //注册侧边栏信息 register_sidebar(array( 'name' => 'Topbar', 'before_title' => ' <h3>', 'after_title' => '</h3> ' )); //include sidebar.php文件 get_template_part('sidebar'); //echo,第二个参数可以启用多语言支持 _e('some msg!'); //return some msg __('some msg');
还有一堆the_xxx的api就不一一列举了,基本来说开发一套主题还是比较简单的,第一次可以拿一个现有主题来修改,很快就熟悉了。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











There are four ways to adjust the WordPress article list: use theme options, use plugins (such as Post Types Order, WP Post List, Boxy Stuff), use code (add settings in the functions.php file), or modify the WordPress database directly.

To build a website using WordPress hosting, you need to: select a reliable hosting provider. Buy a domain name. Set up a WordPress hosting account. Select a topic. Add pages and articles. Install the plug-in. Customize your website. Publish your website.

A step-by-step guide to replacing a header image of WordPress: Log in to the WordPress dashboard and navigate to Appearance >Theme. Select the topic you want to edit and click Customize. Open the Theme Options panel and look for the Site Header or Header Image options. Click the Select Image button and upload a new head image. Crop the image and click Save and Crop. Click the Save and Publish button to update the changes.

Importing WordPress source code requires the following steps: Create a sub-theme for theme modification. Import the source code and overwrite the files in the sub-topic. Activate the sub-theme to make it effective. Test the changes to make sure everything works.

You can view the WordPress front-end by logging into the dashboard and switching to the View Sites tab; automate the viewing process with a headless browser; installing the WordPress plugin to preview the front-end within the dashboard; viewing the front-end via a local URL (if WordPress is set locally).

WordPress IP blocking plugin selection is crucial. The following types can be considered: based on .htaccess: efficient, but complex operation; database operation: flexible, but low efficiency; firewall: high security performance, but complex configuration; self-written: highest control, but requires more technical level.

WordPress editing dates can be canceled in three ways: 1. Install the Enable Post Date Disable plug-in; 2. Add code in the functions.php file; 3. Manually edit the post_modified column in the wp_posts table.

The steps to create a custom header in WordPress are as follows: Edit the theme file "header.php". Add your website name and description. Create a navigation menu. Add a search bar. Save changes and view your custom header.
