dongshuo9350 2011-07-14 04:52
浏览 48
已采纳

想知道图像被拉到哪里

I am new to css and coding, but I am wondering in the below code where it is pulling the imiage from the post. I dont want this page pulling images...it is pulling imiage from blog post and pages...is there a code I can place to make sure it does not pull the image?

thanks

<style>
    #para1{ text-align:center;}

    .bdr_blb{ 
        border:#000000 solid 4px;
        height:70px;
        background:#cccccc;
        text-align:center;
        font-size:14px; font-weight:700;}

    .light32{ font-size:32px;}

    .bggrey{ background:#cccccc;}

    .light18{ font-size:18px;}

    #bedroom4{
        background:#cccccc;
    }

    .heading_div{float:left;}

    .entry-content{float:left;}

    .thumnail_col ul li {
        float: left;
        list-style: none outside none;
        margin-right: 15px;
    }

    .thumnail_col ul li img{background:none; border:none;}

</style>

?>

    <div id="container">
        <div id="" role="main">
            <?php $args = array( 'category_name' => 'lease', 'orderby' => 'title' ,'order' => 'ASC' );
                        $loop = new WP_Query( $args );
                        while ( $loop->have_posts() ) : $loop->the_post();

                        if ($count==1)
                        {
                            echo "<tr>";
                        }
                        ?>
                       <td><div class="lease">
                            <div class="heading_div"><h2 class="entry-title"><strong><u>
                        <?php
                                                    echo '<a href="'.get_bloginfo('url').'/lease/'.$loop->post->post_name.'" target="_blank">'.$loop->post->post_title.'</a>';
                        ?>
                        </u></strong></div></h2>
                            <div class="entry-content">
                                <div class="desc">
                        <?php
                            the_content();
                        ?>
                        </div>

                        </div></div></td>
                        <?php
                        if($count==$number_of_columns)
                        {
                        echo "</tr>"; 
                        $count=0;
                        }   
                        $count++;

                        endwhile;
                    ?>

        </div><!-- #content -->
    </div><!-- #container -->
  • 写回答

1条回答 默认 最新

  • doutao6380 2011-07-14 13:53
    关注

    You need to find where the function the_content(); is defined. Somewhere, look for:

    function the_content()
    

    Inside of that function definition is possibly code that echo's out an <img> tag. Delete or comment out that portion of the code. Until we see the definition of that function though, we cannot be sure of other consequences of modifying it.

    UPDATE

    This won't prevent the image from being loaded by the browser, but will prevent it from being actually displayed by the browser. It's easier than tracking down the function definition to modify PHP.

    Inside the <style> tag at the top of your posted code above, add this (it can go anywhere in there):

    .entry-content img {display: none;}
    

    This simply tells the CSS no to show the image even though the browser has downloaded it.

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

报告相同问题?

悬赏问题

  • ¥100 复现论文:matlab仿真代码编写
  • ¥15 esp32驱动GC9A01循环播放视频
  • ¥15 惠普360g9的最新bios
  • ¥30 这个功能用什么软件发合适?
  • ¥60 微信小程序,取消订单,偶尔订单没有改变状态
  • ¥15 用pytorch实现PPO算法
  • ¥15 关于调制信号的星座图?
  • ¥30 前端传参时,后端接收不到参数
  • ¥15 这是有什么问题吗,我检查许可证了但是显示有呢
  • ¥15 机器学习预测遇到的目标函数问题