最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

php - I add a button to the site and link it to it, but the button doesn't work - Stack Overflow

programmeradmin1浏览0评论

The site is on WP. added a button in which the first element is a link and the second is the name of the button . the button and the name are displayed correctly, but the link does not work and the developer tools in the browser do not show the link in it. here is the code

@if($item['link'])
    <a class="hero-banner__button button button--yellow"
    @if($item['link']['target'])
        href="{{ $item['link']['url'] }}" target="_blank"
    @endif>
        {{ $item['link']['title'] }}
    </a>
@endif

Here's what the developer's tools show

<a class="hero-banner__button button button--yellow">
    name
</a>

Can you tell me why this class is being used, but there is no href?

initially, I didn't have the href specified. And I added it.

发布评论

评论列表(0)

  1. 暂无评论