2016-09-11 12 views
0

私はスタイルシート(style.css)からwordpressテーマ名を取得したいと思います。Wordpressはスタイルシートからテーマ名を取得

/* 
Theme Name: Campus 
Theme URI: http://www.academiathemes.com/themes/campus/ 
Description: Campus is a free WordPress theme for blogs and review websites. 
Author: AcademiaThemes.com 
Author URI: http://www.academiathemes.com/ 
Version: 1.2.6 
License: GNU General Public License v2.0 
License URI: http://www.gnu.org/licenses/gpl-2.0.html 
Tags: blue, white, light, two-columns, right-sidebar, fixed-layout, responsive-layout, custom-background, custom-menu, featured-images, theme-options, threaded-comments, translation-ready 
Text Domain: campus 
*/ 

:ここたとえば

はstyle.cssにある "テーマ名:キャンパス" PHPの変数に格納する必要があります。

アイデア?ありがとうございました。

答えて

0

たぶん)(本?:

の$ VAR = wp_get_themeを試してみてください。

+0

wp_get_themeの文書:https://codex.wordpress.org/Function_Reference/wp_get_theme –

+0

ありがとう!できます ! – Coze

関連する問題