Unique Post Meta Info Text Next to Date?

Posted in: Newspaper
Post count: 16

I need a little help with something…

On the top of Posts in a specific Category, next to the Author and Date, I’d like to add a snippet of grey linkable text (that doesn’t change color when hovered over).

I need a little piece of Custom CSS that I can use that will reference a specific post category and have a spot for custom text.

Basically, I’m wanting to add something like “- sponsored post -” in a light grey color. If it’s linkable, I’ll probably link the text to the site’s policy page for sponsored content.

So for example Posts in a Category called say “Sponsored Content” will have this little “- Sponsored Post -” disclaimer, and readers can click it to learn more.

It should be non-invasive, so appearing next to the Date and being grey and not changing color when hovered over seem ideal.

Also, our site was built from the Sound Radar demo template.

Any help is greatly appreciated!

Thank you!

  • This topic was modified 7 years by goodnews.
  • This topic was modified 7 years by goodnews.
Post count: 35449

Hi,

I can help with a custom css if you have the – sponsored post – text, maybe with custom fields you could display additional information in the modules, like this example with the advanced custom field plugin
https://forum.tagdiv.com/topic/add-additional-fields-to-posts-in-category-grid/
But in cloud post templates I remember trying to display these fields by shortcode, but it did not work.

Thank you!

Post count: 16

Hi Calin,

What I mean is that at the top of any Post in a certain category I’ve titled “Sponsored Content”, readers will see this:

“Post Title
Author Meta Date Meta – Sponsored Post –
Post Content…”

I’m not trying to change any info that appears in modules. I just want to inject text at the top of certain Posts, in this case the words “- Sponsored Post -“. It should appear next to the Date meta info at the top of these Posts.

Since I want that text to appear on every article in one particular category, I’d think a little CSS snippet would do the trick.

Let me know if you can help. 🙂

Post count: 35449

Hi,

You can try this custom css
.category-gadgets .td-module-meta-info .td-post-date::after {
content: " - Sponsored Post ";
}

All you need to do is to check your category like this
-> https://www.screencast.com/t/XbgOG9g0SXw
But notice that this code will work only on default templates, will not work with cloud templates.

Thank you!

Post count: 16

Hi Calin,

Wow, that works pretty well actually. Thank you. One more thing… is it possible to make that text linkable? I’d love to be able to link it to a page if possible.

Thanks!

Post count: 35449

Hi,

Unfortunately for the above solution you can not set a link on that text, sorry!
But you can use a single post template from tagDiv Cloud Library and edit it, set the text were you want -> https://www.screencast.com/t/tLpMd0k3A98i -> https://www.screencast.com/t/UOTEtbwDtl

Thank you!

Post count: 16

Okay, great. I’ll look further into the Cloud Library post template options.

Thank you!

Viewing 7 posts - 1 through 7 (of 7 total)
The forum ‘Newspaper’ is closed to new topics and replies.