我有一个优惠券网站,显示商店页面上的商店网址。我想要的只是在每个商店末尾没有显示http://开头处的http://变体如何去除http:// www。从PHP功能只留下.com
这里是我的代码,显示商店网址,我只想要显示domain.com而不是http://www.domain.com,也可能显示为http://domain.com
<p class="store-url"><a href="<?php echo $url_out; ?>" target="_blank"><?php echo $stores_url; ?>
它显示喜欢这样,因为这个功能的
<div class="store">
<?php // grab the store meta data
$term = get_term_by('slug', get_query_var('term'), get_query_var('taxonomy'));
$stores_url = esc_url(get_metadata(APP_TAX_STORE, $term->term_id, 'clpr_store_url', true));
$dest_url = esc_url(get_metadata(APP_TAX_STORE, $term->term_id, 'clpr_store_aff_url', true));
// if there's a store aff link, then cloak it. else use store url
if ($dest_url)
$url_out = esc_url(home_url(CLPR_STORE_REDIRECT_BASE_URL . $term->slug));
else
$url_out = $stores_url;
?>
可以做些什么................
没有工作.... – 2012-08-02 18:32:47
我重新提交的问题与更多细节 – 2012-08-02 18:43:27