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

posts - Difficulty hiding a span per a body class within WordPress

programmeradmin1浏览0评论

I am trying to hide a span class as per the CSS class within the body tag.

Here is the HTML I am trying to hide:

<span class='efav-span'><img src="">Content here</span>

And the body tag is this:

<body class="post-template-default single single-post postid-5613 single-format-standard wp-custom-logo wp-embed-responsive cookies-not-set post-image-above-header post-image-aligned-center no-sidebar nav-float-right fluid-header separate-containers active-footer-widgets-0 header-aligned-left dropdown-hover" itemtype="" itemscope>

So what I thought would easily work is this:

.single.efav-span {display: none}   

But oddly it doesn't?

I want that span to be hidden on ALL regular WordPress Posts.

Any idea what I am doing wrong?

Thanks

I am trying to hide a span class as per the CSS class within the body tag.

Here is the HTML I am trying to hide:

<span class='efav-span'><img src="">Content here</span>

And the body tag is this:

<body class="post-template-default single single-post postid-5613 single-format-standard wp-custom-logo wp-embed-responsive cookies-not-set post-image-above-header post-image-aligned-center no-sidebar nav-float-right fluid-header separate-containers active-footer-widgets-0 header-aligned-left dropdown-hover" itemtype="https://schema/Blog" itemscope>

So what I thought would easily work is this:

.single.efav-span {display: none}   

But oddly it doesn't?

I want that span to be hidden on ALL regular WordPress Posts.

Any idea what I am doing wrong?

Thanks

Share Improve this question asked Jun 3, 2019 at 11:25 HenryHenry 9831 gold badge8 silver badges31 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

Answer was simple:

.single .efav-span {display: none} 

add spacing to each element

发布评论

评论列表(0)

  1. 暂无评论