ADMEI CMS Features & Theme Development Guide
Bilingual (CN/EN) article publishing and category management
Product display, pricing, and inventory management
Homepage banner slide management
Customer message collection and notifications
Blog, Shop, Form modules toggle
RESTful API for Mini Program/App
Company contact, working hours, etc.
Upload/switch WordPress format themes
Multi-role permission management
ADMEI CMS is fully compatible with WordPress theme format, you can upload any WordPress theme:
| File | Description | Example |
|---|---|---|
style.css | Theme header info | Theme Name: My Theme |
index.php | Main template file | Website main page |
| File | Description |
|---|---|
functions.php | Theme functions file |
screenshot.png | Theme screenshot |
header.php | Header template |
footer.php | Footer template |
sidebar.php | Sidebar template |
Create theme folder in themes directory:
/themes/my-theme/ ├── style.css ├── index.php ├── functions.php └── screenshot.png
/* Theme Name: My Custom Theme Theme URI: https://example.com Author: Your Name Author URI: https://example.com Description: A custom theme for ADMEI CMS Version: 1.0.0 License: GNU General Public License v2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Tags: responsive, bilingual, custom Text Domain: my-theme */
<?php
// 引入配置
require_once dirname(__FILE__) . '/../../../config.php';
$pdo = new PDO("mysql:host=".DB_HOST.";dbname=".DB_NAME, DB_USER, DB_PASS);
$pdo->exec("SET NAMES utf8mb4");
// 获取数据
$slides = $pdo->query("SELECT * FROM admei_slides WHERE status=1")->fetchAll();
$products = $pdo->query("SELECT * FROM admei_products WHERE status='published'")->fetchAll();
?>
<!DOCTYPE html>
<html>
<head>
<title><?php bloginfo('name'); ?></title>
<link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/style.css">
</head>
<body>
<header>
<h1><?php bloginfo('name'); ?></h1>
</header>
<main>
<?php foreach($slides as $slide): ?>
<div class="slide">
<img src="<?php echo $slide['image']; ?>">
</div>
<?php endforeach; ?>
</main>
</body>
</html>
| Function | Description |
|---|---|
bloginfo('name') | Site name |
bloginfo('description') | Site description |
bloginfo('template_url') | Theme directory URL |
bloginfo('url') | Site URL |
| Table | Description |
|---|---|
admei_articles | Articles |
admei_products | Products |
admei_categories | Categories |
admei_slides | Slides |
admei_company | Company info |
admei_messages | Messages |
Login to Admin → API → Create API Key
| Endpoint | Description |
|---|---|
/api.php?request=articles | Article list |
/api.php?request=products | Product list |
/api.php?request=categories | Category list |
/api.php?request=slides | Slide list |
/api.php?request=company | Company info |
/api.php?request=settings | Site settings |
curl -H "Authorization: Bearer YOUR_API_KEY" \ https://admei.ganji.au/api.php?request=company
{
"success": true,
"data": {
"name": "ADMEI 公司",
"name_en": "ADMEI Company",
"phone": "0434 488 888",
"email": "info@admei.net",
"address": "墨尔本澳大利亚",
"address_en": "Melbourne, Australia"
}
}