How to remove the text “Published On:” in Avada custom archive page

Avada theme screenshot

Recently I created a custom Blog and Blog Archive page for a site using the Avada theme, and this brought my first experience with Fusion Builder. 

This in itself was a reasonably smooth process, once I watched a tutorial or two on how to best delineate between header, content, and footer.

Whilst I got the Blog page working the way I wanted it, I noticed on the Blog Archive page that, within the meta information, some extra strings were being presented such as showing “Published On:” before the published date, and “Categories:” before the list of categories. These don’t show on the standard Blog page, and it seemed more tied to the Post Card Blog Archive element I was using.

I couldn’t find any way within Avada options (nor element options) to control this, or change the labelling.

Thanks to this Stack Overflow question, I was able to find more generally where the issue was coming from but then had to dive a little deeper to find out the exact file in question, as it wasn’t mentioned in any of the answers.

Part of the issue is that the above mentioned strings all form part of a single span, meaning that the “Published On:” string was immediately followed by the actual published date, and contained within a single span. This meant a CSS solution alone was not going to work.

So, for those that might have followed the same path and looking for something a little more specific, I can tell you that the way I fixed it was to find the Fusion Builder plugin (fusion-builder), then the “shortcodees” folder, “components” folder, meta.php file.

Doing a search for “Published On:” within this file showed this:

case 'published_date':
	/* Translators: %s: Date. */
	$content .= '<span class="fusion-tb-published-date">' . sprintf( esc_html__( 'Published On: %s', 'fusion-builder' ), get_the_time( $date_format ) ) . '</span>' . $separator;
	break;<br />

I kept the “%s” component so that the code now read as this (recommended to make a copy of the original file before editing):

case 'published_date':
	/* Translators: %s: Date. */
	$content .= '<span class="fusion-tb-published-date">' . sprintf( esc_html__( '%s', 'fusion-builder' ), get_the_time( $date_format ) ) . '</span>' . $separator;

Rinse and repeat for “Categories:” and any other meta label you might want to remove. Save the file, and upload it to the server, refresh the page and got the result I wanted.

The downside of this method is that the changes will need to be made again if and when the Avada theme is updated, but to date I have not found another way to handle this situation.

In the meantime, I hope this information has helped you!