0

我正在尝试使用“动态特色图像”插件在我的侧边栏中显示其他特色图像,但是由于我对 php 不太熟悉,因此在理解这一切的工作原理时遇到了一些问题。

我想在侧边栏中显示特色图像并将它们调整为侧边栏宽度并垂直堆叠。目前我将它们放在侧边栏中,但它们是它们的原始尺寸并且水平相邻。

到目前为止,这是我的代码中的内容:

    global $dynamic_featured_image;
    $featured_images = $dynamic_featured_image->get_featured_images( );

        foreach($featured_images as $featured_image) { 
            echo "<img src='".$featured_image['full']."'>"; 
        }
}
   while ( have_posts() ) : the_post();

   if( class_exists('Dynamic_Featured_Image') ) {
       global $dynamic_featured_image;
       $featured_images = $dynamic_featured_image->get_featured_images( );
       
       //You can now loop through the image to display them as required



   }
   
   endwhile;

就像我说的我对 php 不太熟悉,所以我可能在这里遗漏了很多代码来做我想做的事情。任何帮助,将不胜感激。

4

0 回答 0