1

我正在使用一个 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,但我有一些编码知识,有人可以帮我吗?

4

1 回答 1

0

我查看了 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.

于 2012-12-29T02:08:25.557 回答