链接创建Wordpress照片库

时间:2016-05-14 17:39:59

标签: wordpress gallery attachment

我正在创建一个图库并将其发布在新帖子中

前:

[gallery ids="2746,2743,2740,2710,2665,2663,2662"]

发布后

<div id="gallery-1" class="gallery galleryid-2653 gallery-columns-3 gallery-size-thumbnail">
    <dl class="gallery-item">
        <dt class="gallery-icon landscape">
            <a href="http://localhost/?attachment_id=2746">
                <img src="http://localhost/wp-content/uploads/2016/04/Masoud-Atashin-Jaye-Khalit-150x150.jpg" class="attachment-thumbnail" alt="dsf" height="150" width="150">
            </a>
        </dt>
        <dd class="wp-caption-text gallery-caption">
            dsf
        </dd>
    </dl>
    <dl class="gallery-item">
        <dt class="gallery-icon landscape">
            <a href="http://localhost/2016/03/contrary-to-popular-belief-9/top-slider-3-3/">
                <img src="http://localhost/wp-content/uploads/2016/04/top-slider-3-150x120.png" class="attachment-thumbnail" alt="df" height="120" width="150">
            </a>
        </dt>
        <dd class="wp-caption-text gallery-caption">
            df
        </dd>
    </dl>
    <dl class="gallery-item">
        <dt class="gallery-icon landscape">
            <a href="http://localhost/2016/03/contrary-to-popular-belief-9/2-4/">
                <img src="http://localhost/wp-content/uploads/2016/04/2-150x150.jpg" class="attachment-thumbnail" alt="dsf" height="150" width="150">
            </a>
        </dt>
        <dd class="wp-caption-text gallery-caption">
            dsf
        </dd>
    </dl>
    <br style="clear: both">
    <dl class="gallery-item">
        <dt class="gallery-icon landscape">
            <a href="http://localhost/?attachment_id=2710">
                <img src="http://localhost/wp-content/uploads/2016/03/image8_medium-150x150.jpg" class="attachment-thumbnail" alt="image8_medium" height="150" width="150">
            </a>
        </dt>
    </dl>
    <dl class="gallery-item">
        <dt class="gallery-icon landscape">
            <a href="http://localhost/2016/03/contrary-to-popular-belief-2/top-slider-1/">
                <img src="http://localhost/wp-content/uploads/2016/03/top-slider-1-150x150.png" class="attachment-thumbnail" alt="top-slider-1" height="150" width="150">
            </a>
        </dt>
    </dl>
    <dl class="gallery-item">
        <dt class="gallery-icon landscape">
            <a href="http://localhost/2016/03/contrary-to-popular-belief/detail-1/">
                <img src="http://localhost/wp-content/uploads/2016/03/detail-1-150x150.png" class="attachment-thumbnail" alt="detail-1" height="150" width="150">
            </a>
        </dt>
    </dl>
    <br style="clear: both">
    <dl class="gallery-item">
        <dt class="gallery-icon landscape">
            <a href="http://localhost/2016/03/contrary-to-popular-belief/world-1/">
                <img src="http://localhost/wp-content/uploads/2016/03/world-1-150x150.png" class="attachment-thumbnail" alt="world-1" height="150" width="150">
            </a>
        </dt>
    </dl>
    <br style="clear: both">
</div>

我想改为

 <a rel="prettyPhoto[gallery]" href="http://localhost/?attachment_id=2710"><img src="http://localhost/wp-content/uploads/2016/03/image8_medium-150x150.jpg" class="attachment-thumbnail" alt="image8_medium" height="150" width="150"></a>  

想要直接链接照片。给我像href

 <a rel="prettyPhoto[gallery]"  href="http://localhost/wp-content/uploads/2016/04/top-slider-3-150x120.png"><img   src="http://localhost/wp-content/uploads/2016/04/top-slider-3-150x120.png"  class="attachment-thumbnail" alt="df" height="120"  width="150"></a>  

1 个答案:

答案 0 :(得分:0)

只需添加到您当前的短代码链接=“文件”

@media only screen and (min-width: 1224px)
.cms-customized-mobile-cases #header {
    margin: 0 auto;
    width: 1200px;
}