[英]Editing a Wordpress widget
我正在使用一個Wordpress主題,其中這是一個小部件代碼,
/* Widget settings. */
$widget_ops = array( 'classname' => 'maxmag_catlist_widget', 'description' => __('A widget that displays a list of posts from a category of your choice.', 'maxmag_catlist_widget') );
/* Widget control settings. */
$control_ops = array( 'width' => 150, 'height' => 200, 'id_base' => 'maxmag_catlist_widget' );
/* Create the widget. */
$this->WP_Widget( 'maxmag_catlist_widget', __('Max Mag: Category List Widget', 'maxmag_catlist_widget'), $widget_ops, $control_ops );
在這里,我想編輯此小部件的寬度,因此嘗試更改該行
$control_ops = array( 'width' => 150, 'height' => 200, 'id_base' => 'maxmag_catlist_widget' );
但是,它什么都沒有改變。 我一點PHP都不懂,但是我有一些編碼知識,有人可以幫我嗎?
我看了themeforest中的maxmag主題(我想您使用了這個主題),並且我注意到在style.css文件中它具有此指令(以及其他類似的其他小部件類型的指令):
.sidebar-widget {
float: left;
font: 400 12px/normal 'Open Sans', sans-serif;
margin-bottom: 30px;
overflow: hidden;
width: 100%;
}
我不知道您必須更改哪個窗口小部件,但我認為您可以更改width: 100%;
解決問題的說明。
L.
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.