admin管理员组文章数量:1317909
I created a slider shortcode in my custom theme. My sliders images display at the background image. I don't know how can I display background slider images using shortcode
Here is my code:
$string .=' <div class="main-slider-item" style="background-image: url(<?php echo $backgroundImg[0]; ?>); background-size: cover; background-repeat: no-repeat;">' .
' <div class="d-table">' .
' <div class="d-table-cell">' .
'<div class="container">'.
' <div class="main-slider-content">' .
'<h1>' . get_the_title() . '</h1>' .
get_the_content() .
' <div class="slider-btn">'.
'<a href="'.$slider_buttons1link.'" class="default-btn">' . $slider_buttons1txt . '</a>' .
'<a href="'.$slider_buttons2link.'" class="default-btn-two">' . $slider_buttons2txt . '</a>' .
'</div>'.
' </div>' .
'</div>' .
' </div>'.
' </div>' .
'</div>';
本文标签: custom post typesbackground featured image display using shortcode
版权声明:本文标题:custom post types - background featured image display using shortcode 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742026781a2415693.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论