标签: wordpress

如何确定在服务器上设置了哪个PHP处理程序

我是否可以通过浏览器执行PHP命令,该浏览器将返回设置服务器要使用的PHP处理程序?

wordpress

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

WordPress的管理员卡在https,如何将其关闭?

我的wordpress网站的管理员端停留在HTTPS中,因此运行非常缓慢。我正在尝试将管理员设置为HTTP。这是我的设置以及到目前为止我尝试过的内容。

  • 带有Godaddy SSL证书的Godaddy VPS
  • 在wp-config.php中,我有: define( 'FORCE_SSL_ADMIN', false );
  • 尝试安装wordpress-https插件。管理员https复选框为灰色/已禁用。这是该插件上的设置。 在此处输入图片说明
  • 检查httpd.conf和htaccess文件是否有任何重写-找不到。
  • 服务器确实安装了Vernish-要求Godaddy支持检查Varnish中的所有相关配置。找不到。
  • 我已经尝试根据这里的建议注释掉wp-includes / functions.php中的代码(请参阅joelbair用户的注释)。
  • 我总是刷新缓存,有时在进行更改后会完全重新引导VPS。

有什么建议么?它可能与SSL签名证书有关,还是与最初在服务器上安装SSL的方式有关?

wordpress .htaccess ssl https httpd.conf

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

如何在Wordpress中获取菜单项?

我想获取我的wp主菜单的项目.我尝试了一些代码,但所有代码都只返回空白页面.我不知道我必须使用哪种方法,不知道是否需要在页面中包含任何其他页面?

有没有办法直接从数据库中获取菜单项而不使用wp方法和函数?我现在无法理解wp的表结构.所以我完全不知道表之间的关系.

谢谢.

php wordpress menu

0
推荐指数
2
解决办法
3万
查看次数

jQuery.不要通过li迭代

有一堆李基本上是真或假的问题.问题是它适用于第一个li而不是下一个,下一个,下一个等

jquery代码是:

<script>

        jQuery(document).ready(function() {

            //Run the each iteration 
            jQuery('#question').each(function(i){

                // Hide the initial values 
                jQuery('#true').hide();
                jQuery('#false').hide();

                var answer = '<?php echo the_sub_field( 'true_or_false' ); ?>';     

                console.log(answer);        

                jQuery("#button").click(function($){
                        $.preventDefault();
                        if( answer == 'True' ) {
                            jQuery('#false').hide();
                            jQuery('#true').show();
                        }
                });

                jQuery("#button2").click(function($){
                        $.preventDefault();                 
                        if( answer == 'True' ) {
                            jQuery('#true').hide();
                            jQuery('#false').show();
                        }
                });

            });                 


        });

    </script>   
Run Code Online (Sandbox Code Playgroud)

HTML代码是:

<li id="question">
        <div id="statement">
            <?php the_sub_field( 'question' ); ?>?
        </div>
        <div id="true">
            <?php the_sub_field( 'true_answer' ); ?>
        </div>
        <div id="false">
            <?php the_sub_field( 'false_answer' ); ?> …
Run Code Online (Sandbox Code Playgroud)

html javascript php wordpress jquery

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

Gulp Uncss打破Bootstrap Dropdown导航栏导航

我想在我的一个大css文件中使用uncss,但这样做打破了我的引导程序导航的下拉列表.

这是工作部分:http://metalotechnika.com

以下是我使用unss的部分:http://metalotechnika.horyzon.de .

您会注意到下拉菜单无效.它是使用twitter bootstrap导航栏.

我的gulpfile部分看起来像这样:

gulp.task('uncss', function() {
    return gulp.src('style.css')
        .pipe(uncss({
            html: ['uncss/uncss.html']
        }))
        .pipe(gulp.dest(''));
});
Run Code Online (Sandbox Code Playgroud)

即使我在这里选择了一个URL,它也会中断.我暂时禁用了生产站点上的缓存和css压缩,这样你就可以看看style.css中的重要区别,即获得"unss"的那个.

如何使用uncss减少我的CSS?为什么它会破坏,我该如何解决这个问题呢?

html css wordpress twitter-bootstrap uncss

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

如何删除重力形式样式表(wp_deregister_style和wp_dequeue_style)?

这是我网站的当前HTML输出.

<link rel='stylesheet' id='gforms_reset_css-css'  href='http://example.com/wp-content/plugins/gravityforms/css/formreset.css?ver=1.7.11' type='text/css' media='all' />
<link rel='stylesheet' id='gforms_datepicker_css-css'  href='http://example.com/wp-content/plugins/gravityforms/css/datepicker.css?ver=1.7.11' type='text/css' media='all' />
<link rel='stylesheet' id='gforms_formsmain_css-css'  href='http://example.com/wp-content/plugins/gravityforms/css/formsmain.css?ver=1.7.11' type='text/css' media='all' />
<link rel='stylesheet' id='gforms_ready_class_css-css'  href='http://example.com/wp-content/plugins/gravityforms/css/readyclass.css?ver=1.7.11' type='text/css' media='all' />
<link rel='stylesheet' id='gforms_browsers_css-css'  href='http://example.com/wp-content/plugins/gravityforms/css/browsers.css?ver=1.7.11' type='text/css' media='all' />
Run Code Online (Sandbox Code Playgroud)

我想使用下面的代码在functions.php中取消注册这个样式gforms_datepicker_css,但它不起作用.

add_action( 'wp_print_styles', 'my_deregister_styles', 100 );  
function my_deregister_styles() {
    if( is_front_page() || is_home() || is_page( 403 ) ){ 
        wp_deregister_style( 'gforms_datepicker_css' );
    } 
}
Run Code Online (Sandbox Code Playgroud)

php wordpress

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

在wordpress登录前调用自定义函数

我想在登录前使用输入的登录名和密码调用自定义函数,如果该函数返回true,则用户应继续登录.

我试过add_action('wp_login', 'do_anything');这样做,但登录后调用了我的自定义函数.

有没有办法在登录前调用自定义功能?

php wordpress login

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

Jquery和CSS中的get_template_directory_uri()

我试图使用get_template_directory_uri()将图像加载到jquery.backstretch.js文件和我的styles.css.到目前为止,我将我的图像直接添加到名为"img"的文件夹中的主题文件夹中,我将其用于我的HTML:

 <img src="<?php echo get_template_directory_uri(); ?>/img/logoyellow.png" class="hidden-xs" alt="logo" />
Run Code Online (Sandbox Code Playgroud)

这工作得很好!

但我在jquery文件(jquery.backtretch.js)中执行了以下操作:

  $(document).ready(function () {
       $("#home-section").backstretch("<?php echo get_template_directory_uri(); ?>/img/background-image2.jpg");
   });
Run Code Online (Sandbox Code Playgroud)

但是没有雪茄:(我也想知道如何在我的CSS中加载它.这样的东西:

  #milestones-section {
      background: url('<?php echo get_template_directory_uri(); ?>/img/hbg.jpg') center center;
  }
Run Code Online (Sandbox Code Playgroud)

提前致谢!

wordpress codex

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

PHP函数内部的ECHO语句

我在下面的Wordpress中使用此功能:

function wpstudio_doctype() {
  $content = '<!DOCTYPE html>' . "\n";
  $content .= '<html ' . language_attributes() . '>';
    echo apply_filters( 'wpstudio_doctype', $content );
}
Run Code Online (Sandbox Code Playgroud)

问题是该函数显示$content<!DOCTYPE html>标记上方,而不是在标记内添加字符串HTML.

我在这做错了什么?

php wordpress html5

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

产品名称WooCommerce,联系表格7

我也有woocommerce插件和联系表单7插件.

在产品详细信息页面上,在底部的选项卡中,我有一个名为"查询"的自定义选项卡.我正在嵌入我创建的表单之一.

虽然我只是想在形式上回应产品标题,所以人们不必自己填写.

这似乎不起作用..

    <p>Your Name (required)<br />
    [text* your-name] </p>

<p>Your Email (required)<br />
    [email* your-email] </p>

<p>Subject<br />
  </p>

<?php echo get_the_title( 'id' ); ?>

<?php echo WC_Product::get_formatted_name(); ?>


<p>Your Message<br />
    [textarea your-message] </p>

<p>[submit "Send"]</p>
Run Code Online (Sandbox Code Playgroud)

有谁有想法吗 ?

提前致谢

php wordpress contact woocommerce

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