• I want to create a simple plugin that creates a similar to “Get Shortlink”, side by side with it. How can I do it (just the part of adding the button)?

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    Hook the filter ‘the_content’ and add you content either to the end or beginning of the passed HTML if any of certain template tags return true, such as is_archive() || is_single().

    Your content wouldn’t normally be side by side with Get Shortlink because that plugin inserts a break clear div so that it occurs on a line by itself. If your filter hook fires after Get Shortlink, you could delete that content if found.

Viewing 1 replies (of 1 total)
  • The topic ‘How to create button’ is closed to new replies.