doufuhao0566 2012-12-28 22:33 采纳率: 100%
浏览 44
已采纳

编辑Wordpress小部件

I am using a Wordpress theme in which this is a code of widget ,

/* 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 );

Here I want to edit the width of this widget , so I tried to change the line

$control_ops = array( 'width' => 150, 'height' => 200, 'id_base' => 'maxmag_catlist_widget' );

However it changed nothing. I don't know a bit of php, but I have some coding knowledge, can anyone please help me with this?

  • 写回答

1条回答 默认 最新

  • duanjiaoxi4928 2012-12-29 02:08
    关注

    I took a look to the maxmag theme from themeforest ( i think you used this one) and i noted that in the style.css files it has this instruction (and others like this for other widget types):

    .sidebar-widget {
        float: left;
        font: 400 12px/normal 'Open Sans', sans-serif;
        margin-bottom: 30px;
        overflow: hidden;
        width: 100%;
        }
    

    I don't know which is the widget you have to change but I think that you can change the width: 100%; instruction to solve your problem.

    L.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 运筹学中在线排序的时间在线排序的在线LPT算法
  • ¥30 求一段fortran代码用IVF编译运行的结果
  • ¥15 深度学习根据CNN网络模型,搭建BP模型并训练MNIST数据集
  • ¥15 lammps拉伸应力应变曲线分析
  • ¥15 C++ 头文件/宏冲突问题解决
  • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
  • ¥50 安卓adb backup备份子用户应用数据失败
  • ¥20 有人能用聚类分析帮我分析一下文本内容嘛
  • ¥15 请问Lammps做复合材料拉伸模拟,应力应变曲线问题
  • ¥30 python代码,帮调试,帮帮忙吧