dongsimang4036 2014-07-18 08:14 采纳率: 100%
浏览 18
已采纳

wordpress主题中<em>的未知输出

on my new theme in wordpress a <em> Tag is outputed, but i don't know why... I dont use any <em> Tags anywhere in my theme, so i can't understand why this is outputed and destroys my design.

Here the Content of my index.php

 <?php get_header(); ?>
<div class="row">
    <div class="col-sm-12 blog-content">
        <div class="container">
            <div class="col-sm-8 blog-main">
                <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
                    <div class="col-sm-12 blog-post">
                         <div class="date">
                            <div class="corner"></div>
                            <?php the_date('d M Y'); ?>
                        </div>
                        <h2><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2>
                        <div class="meta">
                            <i class="icon-user"></i>
                            <span><?php the_author(); ?></span>

                            <i class="icon-bookmark"></i>
                            <span><?php the_category(', '); ?></span>

                            <i class="icon-bubble"></i>
                            <a href="<?php the_permalink() ?>"><?php comments_number('0 Kommentare', '1 Kommentare', '(% Kommentare)' );?></a>
                        </div>
                        <div class="entry">
                            <?php echo apply_filters('the_content', substr(get_the_content(), 0, 400) ); ?>
                        </div>
                        <div class="row">
                            <div class="col-sm-offset-8 col-sm-4 col-md-offset-9 col-md-3 col-lg-offset-9 col-lg-3 more">
                                <div class="btn">
                                    <a href="<?php the_permalink() ?>">Mehr lesen</a>
                                </div>
                            </div>
                        </div>
                    </div>
                <?php endwhile; endif; ?>
            </div>

            <div class="col-sm-3 col-sm-offset-1 blog-sidebar">
                <?php get_sidebar(); ?>
            </div>
        </div>
    </div>
</div>

<?php get_footer(); ?>

Here you can watch my problem live. thorstenreichelt.de

Thanks for Help ;)

  • 写回答

3条回答 默认 最新

  • duanmeng1858 2014-07-18 08:25
    关注

    There is a em tag in your content (not in your theme). As you truncate it for the preview, in the first 400 characters you have the opening em tag but not the closing one, so the final HTML and your design are "broken".

    Have a look at strip_tags() PHP function, or any equivalent used in Wordpress theming functions.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥20 测距传感器数据手册i2c
  • ¥15 RPA正常跑,cmd输入cookies跑不出来
  • ¥15 求帮我调试一下freefem代码
  • ¥15 matlab代码解决,怎么运行
  • ¥15 R语言Rstudio突然无法启动
  • ¥15 关于#matlab#的问题:提取2个图像的变量作为另外一个图像像元的移动量,计算新的位置创建新的图像并提取第二个图像的变量到新的图像
  • ¥15 改算法,照着压缩包里边,参考其他代码封装的格式 写到main函数里
  • ¥15 用windows做服务的同志有吗
  • ¥60 求一个简单的网页(标签-安全|关键词-上传)
  • ¥35 lstm时间序列共享单车预测,loss值优化,参数优化算法