标签: wordpress-plugin

wordpress有一个很好的问答插件吗?

我想为我的wordpress博客实现'stackoverflow'类型的答案和问题.有什么建议?

wordpress wordpress-plugin

0
推荐指数
1
解决办法
4266
查看次数

Wordpress如何设置小部件的默认值?

我试图制作自己的小部件.但我发现这并不容易.我正在尝试设置默认值,但我不知道如何做到这一点.

是的,我谷歌搜索了很多.我差不多试了一个星期来获得我自己的选项页面和自定义小部件,但我没有成功.

所以回到我的问题,现在这是我的代码:

class Superdeal_Widget extends WP_Widget {

public function __construct()
{
    parent::__construct(
        'Superdeal-widget',
        'Superdeal Widget',
        array(
            'description' => 'Superdeal widget'
        ),
        array (
            'width' => 400,
            'height' => 350
        )
    );
}  

public function widget( $args, $instance )
  {
    // basic output just for this example
    echo '<p><a href="'.$instance['url'].'">'.$instance['titel'].'&nbsp;'.$instance['superdeal'].'</a></p>';

  }

  public function form( $instance )
  {
    // removed the for loop, you can create new instances of the widget instead
    ?>
     <p>
      <label for="<?php echo $this->get_field_id('titel'); ?>">Titel</label><br />
      <input …
Run Code Online (Sandbox Code Playgroud)

wordpress wordpress-theming wordpress-plugin

0
推荐指数
1
解决办法
2272
查看次数

如何在woocommerce中以编程方式删除优惠券

我在自定义的woocommerce插件中以编程方式添加了优惠券.现在我想在插件停用时删除优惠券.

我该怎么做

我在register_activation_hook上添加了优惠券代码

wordpress wordpress-plugin woocommerce

0
推荐指数
1
解决办法
1914
查看次数

qTranslate Importer"请先将qTranslate设置保存到数据库"

我正在开发wordpress中的多语言网站,我需要翻译阿拉伯语的网站内容,

我在这里使用,qTranslate Importer但每次都会出现这个错误

"Please save the qTranslate settings to the datbase first".
Run Code Online (Sandbox Code Playgroud)

即使我遵循此文档 请在这方面帮助我或建议我还有其他方式来翻译Wordpress网站的内容?(WP 3.6的任何插件)

php wordpress wordpress-theming web-deployment wordpress-plugin

0
推荐指数
1
解决办法
507
查看次数

NextGEN Gallery专辑排序

我正在使用WordPress中的NextGEN插件来显示相册中每个图库的缩略图.但是,如果专辑中有5个或更少的画廊,我们只会保留在相册中指定的图库订单.当相册中有超过5个画廊时,缩略图会以一致但错误的顺序显示.添加第7个画廊再次洗牌,等等.

我查看了数据库中的订单,但它太神秘了,例如,WyI2IiwiNSIsIjQiLCIzIiwiMiIsIjEiXQ ==

这是我正在使用的短代码:

[ngg_images album_ids="9" display_type="photocrati-nextgen_basic_compact_album" thumbnail_height="300" thumbnail_width="300" thumbnail_crop="1" override_thumbnail_settings="1"]
Run Code Online (Sandbox Code Playgroud)

wordpress wordpress-plugin nextgen-gallery

0
推荐指数
1
解决办法
4616
查看次数

在订单明细中的订单项目表中显示产品元

我需要为订单商品添加自定义列,并在此列中显示特定的产品元数据。我的意思是如下图所示,我找不到woocommerce的任何操作来添加此列! 在此处输入图片说明

php wordpress wordpress-plugin woocommerce

0
推荐指数
1
解决办法
5027
查看次数

如何为多个角色设置add_submenu_page?

我已经创建了一些wordpress管理菜单,并且想为多个角色添加以下菜单:

add_submenu_page('Events', 'Colloqui', 'subscriber, editor', 'events', 'ww_events');
Run Code Online (Sandbox Code Playgroud)

这仅适用于订阅者角色。但是,我希望该菜单也具有管理员角色。

wordpress wordpress-plugin

0
推荐指数
1
解决办法
2127
查看次数

PHP帮助 - 数组和img

我在wordpress中遇到插件问题.我想自定义它,但我根本不懂PHP,不知道我应该修改什么或哪里,以便我可以用图像替换那些"»"和"".

这是我相信它对此负责的代码:

// Set defaults
if ($ta_multipage == '' OR $_POST["ta_multipage_Reset"]) {
    $ta_multipage = array (
        'mp1_before'            => '',
        'mp1_after'             => '',
        'mp1_title_number'      => 2,
        'mp1_quick_type'        => 1,
        'mp1_nav_type'          => 2,
        'mp1_nav_number'        => 'True',
        'mp1_previouspagelink'  => '&laquo;',
        'mp1_nextpagelink'      => '&raquo;',
        'mp1_firstpagetext'     => 'On First Page',
        'mp1_lastpagetext'      => 'On Last Page',
        'mp1_display_all'       => 'True',
        'mp1_display_all_text'  => 'View All',          
        'mp1_div_align'         => 'center',
        'mp1_insert_top'        => 'False',
        'mp1_insert_bottom'     => 'False',
        'mp1_insert_pages'      => 'False',
        'mp2_before'            => 'Page :',
        'mp2_after'             => '',
        'mp2_title_number'      => 2,
        'mp2_quick_type' …
Run Code Online (Sandbox Code Playgroud)

php wordpress-plugin

-3
推荐指数
1
解决办法
72
查看次数

解析错误:语法错误wordpress

我有以下错误:

解析错误:语法错误,意外T_STRING,期待','或';' 在第64行的../public_html/wp-content/themes/nano/includes/galleri.php**

请帮助我让我的代码工作!

http://pastebin.com/B0ndywWc

有问题的代码:

<?php
    $ccfit_img_thumb = wp_get_attachment_image_src( get_post_thumbnail_id( get_the_id() ), 'ccfit_thumb', false );
    $ccfit_img_big = wp_get_attachment_image_src( get_post_thumbnail_id( get_the_id() ), 'ccfit_big', false );

    echo '
        <div class="col-md-4">
        <div class="inner">
        <a href="'. $ccfit_img_big[0] .'"></a>
        <img src="'. $ccfit_img_thumb[0] .'">
        <h2>'. get_the_title() .'</h2>
        <p>'. get_the_content() .'</p>
        <hr>
        <?php
          if (isset($featuredImages) && is_array($featuredImages)) {
            foreach($featuredImages as $images) {
                $thumb = $images['thumb']; // <---- line 64
                $fullImage = $images['full'];
                print ' <a class="fancybox" href="'. $fullImage .'" style="text-align:center">&laquo; Take a look &raquo;</a> ';
            } …
Run Code Online (Sandbox Code Playgroud)

php wordpress wordpress-plugin

-3
推荐指数
1
解决办法
342
查看次数