• Resolved Anonymous User 15283950

    (@anonymized-15283950)


    Hi, is it possible to format output of “permalink” code as an actual link as opposed to plain text, and how?

    Thank you for making this very useful plugin!

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Kuba Mikita

    (@kubitomakita)

    Hi @otapa,

    You can actually just add a regular link and paste the merge tag as an URL 🙂

    You may need to adjust the link url, because editor make it like href="http://{permalink}" and you are looking for just href="{permalink}", but this will be fixed in next release.

    Thread Starter Anonymous User 15283950

    (@anonymized-15283950)

    That was easy 🙂

    Thank you for your quick answer!

    If you don’t mind, I have one more related question. When using “permalink” for forum replies, it returns link to an isolated post. I was wondering if it is possible (using that or some other code) to return the link to a reply, but inside originating thread, in the same way it would if you clicked on the time of post in this forum?

    Plugin Author Kuba Mikita

    (@kubitomakita)

    Probably there is an easy way with the post ID and some URL preparation.

    Please, can you send me an example link to a reply?

    Thread Starter Anonymous User 15283950

    (@anonymized-15283950)

    Format is as follows:

    <topics_root>/<topic_name>/#post-<post_number>

    In the case of your previous post, it would be:
    https://wordpress.org/support/topic/html-formatting-2/#post-8803206

    Plugin Author Kuba Mikita

    (@kubitomakita)

    Ok, I get it. So you are looking for a link like this:

    href="https://wordpress.org/support/topic/html-formatting-2/#post-{ID}"

    Also, can I ask you to rate the plugin? 🙂 You can do it here: https://wordpress.org/support/plugin/notification/reviews/#new-post

    Thread Starter Anonymous User 15283950

    (@anonymized-15283950)

    That’s almost it, except I need it to populate aforementioned <topic_name> with the name of current topic, which is variable, so I can’t use static text. Is there some code that points to parent thread?

    And I will gladly rate your plugin 🙂

    Plugin Author Kuba Mikita

    (@kubitomakita)

    Uh, sorry, I’m doing too many things at the same time and I forgot about this variable.

    Unfortunately, it’s not possible with the default trigger’s merge tags.

    But there should be a reply’s direct link which looks like this https://wordpress.org/support/reply/8803206/, so it’s <forum-base>/reply/{ID} but apparently it’s a bit broken here on wp.org.

    You could also do it in another way – sending the direct link and redirecting it with PHP to the reply in a thread.

    Thread Starter Anonymous User 15283950

    (@anonymized-15283950)

    Direct link you posted is actually the output of “permalink” tag 🙂

    I’ll stick with the original one for now, as I was hoping to achieve the desired result without editing WP PHP files.

    Thank you so much for your assistance and, again, your excellent plugin!

    Plugin Author Kuba Mikita

    (@kubitomakita)

    Thank you! Feel free to come back to me with any problems with the plugin 🙂

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘HTML formatting’ is closed to new replies.