• Resolved ch4ye

    (@ch4ye)


    Hello.

    I wonder if there is a way to add specific link to tag with a class (if post has that tag) to post meta. To make it look like this

    <ul class="nv-meta-list"><li class="meta category"><a href="" rel="category tag">Category</a></li>, <li class="custom class"><a href="" rel="tag">Custom Tag</a></li></ul>

    What’s the name of the hook responsible for post meta? Is it “neve_post_meta_single”?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter ch4ye

    (@ch4ye)

    Ok. I found multiple ways to achieve that, unfortunately they aren’t exactly what i was looking for. Gonna list for whoever ever wonders about this.

    1. Code Snippets plugin, works fine as long as it has option to add After HTML Element. In this case .meta. Would rather not use plugin for that.
    2. Using normal function to append function append_text_to_meta() { echo 'custom text';}add_action( 'neve_post_meta_single', 'append_text_to_meta' ); Unfortunately this adds text above nv-meta-list, just after title.
    3. Went straight up to post_meta.php and added up link to the $markup. This works exactly as i wanted but then update might wash it away.

    Is there any other way? Like modified second option that actually hooks up where it should? I looked up possible hooks, and it’s either neve_post_meta_single or neve_before_content, post meta that includes category, author, comments, is kinda skipped there.

    Hello @ch4ye,

    Thank you for your contribution to Neve!

    The hooks responsible for the post meta are neve_post_meta_single and neve_post_meta_archive.

    If you want to make any edits in the theme without losing them on an update, you can use a child theme. Here is a documentation page about how to create a child theme for Neve.

    I hope this helps!

    Best regards,

    Irinel

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to Add Custom Link to Post Meta’ is closed to new replies.