最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

functions - blank page with wp_get_attachment

programmeradmin1浏览0评论

I want to use the function "wp_get_attachment" but when I use it, my website shows me a blank page while my server locally, the function shows me what I want...

I went through the canvas without finding an answer.

I proceed like this:

<div class="credit-photo">
    <h5>
        <?php
            $idPost = get_the_ID();
            $post_thumbnail_id = get_post_thumbnail_id( $idPost );
            $at= wp_get_attachment( $post_thumbnail_id );

            echo $at['description'];
        ?>
    </h5>
</div>

the line that I think problem is :

$at= wp_get_attachment( $post_thumbnail_id );

Do you have an idea ?

Thx !

发布评论

评论列表(0)

  1. 暂无评论