Add button with link post forum

update 2.

Hello,

First of all thank you for this plugin which, once followed by the subject on the configuration, is a real wonder.

I’m trying to create a button with, as URL, the links to the associated forum topic.

It would be in the form of a “global block” or “same button for all post” which I would like not to have to put the url every time.

Two tracks can be useful I think:

  1. Topics automatically created by WordPress to Discourse are in the form `` https: // discourse.url / post-title```

Problem:

  • I first created the articles on the forum then once mature I published it on the site.
  • If I change a title or the links it won’t work or no longer.
  1. Get the variable (if there is one) and either create a shortcode (I don’t know how to do) or maybe via the WordPress variables and create a special URL.
    cpture liens auto

Note: I use DIVI as a Theme builder for my WordPress

Thanks in advance and sorry for my poor English.

Thank you

[HACF] (https://hacf.fr) French Community of Home Assistant

1 Like

Is this it? Embedding Discourse Comments via Javascript

1 Like

I just looked at the topic, I can’t find a way to add a unique link that automatically leads to the forum link.

I think this information should be stored somewhere and usable as a variable?

Thank you for your quick response anyway.

1 Like

I think the embedding process creates an unlisted topic for each external page it’s used on, which gets listed whenever a reply is posted. Otherwise I don’t think there would be a way of automatically knowing which forum post to link to.

I couldn’t get it to work myself but I think that was a problem with my site rather than Discourse.

1 Like

In fact this function exists because it automatically appears in the comments.

cpture liens auto

1 Like

Oh so you’d like to change the text link to a button?

I would like that when I click on the button it sends me directly to the post.

But I would like a button containing the automatic URL so as not to have to copy paste the address each time.

I do not know if I am clear

You are probably being clear enough for someone who knows more about it :slight_smile: For me, you’d have to describe the steps you’ve taken, what happens and what you want to happen. But do you think this may be your answer?

There is a part that matches, but this leads to important modifications while I think there is a much simpler solution with variables

I will edit my first post to explain in more detail.

Thanks for precious help

De rien. Maybe it’s as well to add the information here or I’ll look more of an idiot for missing the point :slight_smile: In the quoted post above, <%= current_page.url %> is a variable, and I imagine there will be an equivalent for your website.

Thanks again for your help.

I think there is a possibility via the variables in a simple way but I do not think I use the right search terms with my English very French lol

First post updated

Maybe this: Worpdress Shortcode of Current URL | Prodjex

Thank you I’ll look at this as soon as I have a little time