Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Hide "Created by" via CSS doesn't work (CSS selector is missing)

Wilhelm Klauditz December 17, 2020

Hi there,

I would like to hide "Created by [author name]" in the blog posts overview (Blog Posts macro). For the author name I have found the CSS selector. But I cannot find a CSS selector for the "Created by". It's part of the span element "blog title". If I hide that via CSS the blog title is gone, too.

How can I hide "Created by" without hiding the blog title?

 

 

1 answer

0 votes
Bill Bailey
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 17, 2020

Could you paste the HTML of that element (including parent elements)? There may be another way to select that text.

Wilhelm Klauditz December 17, 2020

Hi Bill,

sure. Here is an example. I translated our German text elements into English for a better understanding:

<div class="blog-post-list conf-macro output-block" data-hasbody="false" data-macro-name="blog-posts">
<h4 class="sub-heading">WKI News</h4>
<ul>
<li class="blog-item">
<span class="blog-title"><span class="icon aui-icon content-type-blogpost" title="News">News:</span><a href="/pages/viewpage.action?pageId=20513401">The presentation of the works meeting from December 11, 2020 is now online</a>
Created by</span>
<div class="blog-item-creator"> <a href=" /display/~test-user
" class="url fn confluence-userlink userlink-0" data-username="test-user" title="" data-user-hover-bound="true">User, Test</a></div>
<div class="blog-item-date">
Dez 15, 2020
</div>
<div class="blog-item-space"><a href="/display/WKI">WKI</a></div>
</li>
</ul>
</div>
Bill Bailey
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 19, 2020

Yes, they got lazy and didn't give us anyway to select that content. The only way I can think of requires surgery -- editing the layouts (found in the admin macro) to close the earlier span element, and open a new classed span element for "Created by". I took a quick look on my local version (6.13), and you will have to start at the layouts, then find which of the referenced velocity macros renders a blog post and edit that code.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events