编辑Wordpress小部件

时间:2012-12-28 22:33:25

标签: php wordpress-plugin wordpress

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

1 个答案:

答案 0 :(得分: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,

相关问题