Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/233.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 我的网站上也会显示推荐短代码吗?如何避免这个问题_Php_Wordpress_Wordpress Theming - Fatal编程技术网

Php 我的网站上也会显示推荐短代码吗?如何避免这个问题

Php 我的网站上也会显示推荐短代码吗?如何避免这个问题,php,wordpress,wordpress-theming,Php,Wordpress,Wordpress Theming,嘿,伙计们,非常抱歉这个愚蠢的问题,因为我是wordpress的新手。我只是想展示用户的推荐信 为此,我安装了插件。 然后我创建了一个名为推荐信的新页面。在这一点上,我给出了下面的短代码 [testimonials theme="default_style" paginate="all" count="5" orderby="date" order="ASC" show_title="0" use_excerpt="0" show_thumbs="1" show_date="1" show_ot

嘿,伙计们,非常抱歉这个愚蠢的问题,因为我是wordpress的新手。我只是想展示用户的推荐信

为此,我安装了插件。 然后我创建了一个名为推荐信的新页面。在这一点上,我给出了下面的短代码

[testimonials theme="default_style" paginate="all" count="5" orderby="date" order="ASC" show_title="0" use_excerpt="0" show_thumbs="1" show_date="1" show_other="1" hide_view_more="1" output_schema_markup="1" show_rating="stars"]
到目前为止,所有的工作都很好,但在我的网站上,它显示了我在推荐页面上给出的短代码。

我的管理小组

这是我的page.php

<?php
/**
 * The template for displaying all pages.
 *
 * This is the template that displays all pages by default.
 * Please note that this is the WordPress construct of pages and that other
 * 'pages' on your WordPress site will use a different template.
 *
 * @package OceanWP WordPress theme
 */

get_header(); ?>

    <?php do_action( 'ocean_before_content_wrap' ); ?>

    <div id="content-wrap" class="container clr">

        <?php do_action( 'ocean_before_primary' ); ?>

        <div id="primary" class="content-area clr">

            <?php do_action( 'ocean_before_content' ); ?>

            <div id="content" class="site-content clr">

                <?php do_action( 'ocean_before_content_inner' ); ?>

                <?php
                // Elementor `single` location
                if ( ! function_exists( 'elementor_theme_do_location' ) || ! elementor_theme_do_location( 'single' ) ) {

                    // Start loop
                    while ( have_posts() ) : the_post();

                        get_template_part( 'partials/page/layout' );

                    endwhile;

                } ?>

                <?php do_action( 'ocean_after_content_inner' ); ?>

            </div><!-- #content -->

            <?php do_action( 'ocean_after_content' ); ?>

        </div><!-- #primary -->

        <?php do_action( 'ocean_after_primary' ); ?>

        <?php do_action( 'ocean_display_sidebar' ); ?>

    </div><!-- #content-wrap -->

    <?php do_action( 'ocean_after_content_wrap' ); ?>

<?php get_footer(); ?>


我建议您转到管理面板推荐信->所有推荐信选择编辑推荐信并检查页面中的描述内容。php将代码放在下面的任意位置,并检查其是否工作

<?php echo do_shortcode('[testimonials theme="default_style" paginate="all" count="5" orderby="date" order="ASC" show_title="0" use_excerpt="0" show_thumbs="1" show_date="1" show_other="1" hide_view_more="1" output_schema_markup="1" show_rating="stars"]'); ?>

是否使用_content()来显示它?在你的templatebro里我要检查一下。我认为page.php是对的???您调用推荐的地方可能是page.phpno bro。我没有使用_content()来显示。请发布一些代码,如何显示这里没有所有的测试。。。。有1.推荐信2.添加新的推荐信3.推荐信类别Yok然后选择您从推荐信中撕下的屏幕截图中的推荐信,编辑并检查描述确保您没有在推荐信中的任何位置粘贴短代码。如果您无意中将其粘贴到推荐信中,然后将其删除仍将显示在您的页面上。因此,再次生成你的短代码,并在你想要显示推荐的页面上通过。我只是在我的推荐页面的内容中给出了短代码,我没有通过短代码