【发布时间】:2014-12-08 21:56:05
【问题描述】:
在 wordpress 小部件中,我有一个“图像”小部件。它有:
- 标题
- 您上传或想要上传的图片
- 大小
- 链接
- 链接文字
现在我想知道,是否有一个钩子或其他东西可以用来从保存的小部件中获取该“链接”?见下文。在第 4 行,我想在此处显示来自该图像小部件的链接,其中显示这是我想在此处获取该链接的位置。
if ( function_exists('register_sidebar') )
register_sidebar(array(
'name' => 'Other Serviecs Page Widget',
'before_widget' => '<a href="THIS IS WHERE I WANT TO GET THAT LINK HERE"><div class="col-sm-6 col-md-3">
<div class="add-box-main"> ',
'after_widget' => '<div class="box-bottom"> </div>
</div>
</div>',
'before_title' => '<div class="box-heading"> <img src="../wp-content/uploads/2014/10/OS-LOGO.jpg" class="img-responsive" alt=""><h2>',
'after_title' => '</h2></div>',
));
if ( function_exists('register_sidebar') )
register_sidebar(array(
'name' => 'Other Serviecs Page Bottom Widget',
'before_widget' => '</a>',
'after_widget' => '',
'before_title' => '<h1 class="hide">',
'after_title' => '</h1>',
));
【问题讨论】: