• Resolved spoon25

    (@spoon25)


    I’m testing the plugin and it does an amazing job for various needs. I’m testing some notifications about posts but couldn’t find a shortcode matching the user-friendly permalink and the email keep translating [permalink] into https://mywebsite.com/?p=<post ID>.
    I went through the doc but couldn’t find a better matching shortcode (I maybe missed it). Is there a way to get the link in the format defined in the WordPress Settings > Permalinks? (for example my site is set to use https://mywebsite.com/<author>/<year>/<month>/<slug&gt; )

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author bnfw

    (@voltronik)

    Hi @spoon25,
    Thanks for your message.

    The [permalink] shortcode should use whichever permalink option you have chosen on your WordPress site. If you’re seeing a different result, it could be because another plugin is changing it somehow or rewriting the permalinks on the fly.
    Are you able to investigate if any plugins could be doing this?

    Thread Starter spoon25

    (@spoon25)

    Hi @voltronik,
    Thanks for the quick reply.
    I will start investigating and report back my findings.

    • This reply was modified 3 years, 10 months ago by spoon25.
    Thread Starter spoon25

    (@spoon25)

    You are right, the [permalink] works as expected…
    I was testing a notification when a blog post is scheduled for publication at a later date.
    When I look at the post in WordPress, in the sidebar with the post properties where I can edit the URL slug etc., on screen I see the future URL of the blog post following the permalink settings (/<author>/<year>/<month>/<url slug> in my case), but the link behind it is /?p=<post ID> because the post isn’t published yet.
    Only once the post is published for real (after the scheduled date/time) the permalink will return the nice user-friendly format.

    It looks like what I’m after would be a new shortcode for https://betternotificationsforwp.com/documentation/notifications/shortcodes/?notification=future-post being the “future_permalink” (or “post_scheduled_permalink” to make it more explicit it’s a shortcode valid only for scheduled posts).
    I will have a look at how the edit post page display the future link and if it’s a “clean” thing I will create a pull request on your GitHub (after reading if you accept pull requests or what’s the best way to suggest this new shortcode).

    Plugin Author bnfw

    (@voltronik)

    Hi @spoon25,
    Thanks. That would be perfect if you could do that. I’d be happy to integrate that shortcode into BNFW.
    Thanks for investigating and suggesting a solution.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[permalink] to be the user-friendly format?’ is closed to new replies.