douwulu2576 2015-09-03 19:12
浏览 118

如何使用页面模板中的短代码将图像分配到Wordpress中的图库ID

My friend has asked me to help them move images around on their wordpress site. They have an image slideshow that runs along the bottom of the page and the image gallery that shows, depends on the page template used.

One template has the following code:

<?php 
$tagu = get_post_meta($post->ID,'bototm_gallery');
 ?>

<div class="flt box_bottom">
<ul style="margin-left:10px !important; width:100% !important;" class="sub_photo sub_photo_gigs" class="sub_photo">
    <?php echo do_shortcode($tagu['0']); ?>

</ul>`

and another page template shows this code:

<?php $tagu = get_post_meta($post->ID,'bototm_gallery'); ?>


<div class="flt box_bottom">

<div class="sv_footer_photo">

<?php echo do_shortcode($tagu['0']); ?>

</div>`

How do I add images to a specific gallery? I can't find a gallery id in the media library and/or I don't know where to find the class such as sv_footer_photo or sub_photo.

Could you please explain it to me?

  • 写回答

1条回答 默认 最新

  • doutu6616 2015-09-03 23:10
    关注

    Oh Wow, I've found it and sure enough it was simple.

    I had to click on 'Screen Options' at the top of the page, tick the box for custom fields and then I can see the gallery image ids assigned to that page.

    评论

报告相同问题?

悬赏问题

  • ¥15 基于卷积神经网络的声纹识别
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 stm32开发clion时遇到的编译问题