我正在编辑插件非常糟糕,我对它的经验很少,但我已根据反复试验做了一些调整。
我每个循环都有一个foor,我想用div
projects
包裹整个事物。
foreach ($this->catlist->get_categories_posts() as $single) :
$this->lcp_output .= $this->lcp_build_post($single);
$this->lcp_output .= $this->get_category_link('div class="column-2"');
$this->lcp_output .= $this->get_date($single);
$this->lcp_output .= $this->get_thumbnail($single);
endforeach;
有人能指出我正确的方向吗?
答案 0 :(得分:1)
$this->lcp_output .= '<div class="projects">';
foreach ($this->catlist->get_categories_posts() as $single) :
$this->lcp_output .= $this->lcp_build_post($single);
$this->lcp_output .= $this->get_category_link('div class="column-2"');
$this->lcp_output .= $this->get_date($single);
$this->lcp_output .= $this->get_thumbnail($single);
endforeach;
$this->lcp_output .= '</div>';