Notification link to post not working

For the last year I’ve been testing various approaches with the Post Creation addon - with varying degrees of success. I build a lot of sites for communities and giving them a simple, bullet proof method of creating posts is my ultimate goal.

I came a cross another little quirk today that I cannot explain…

The notification email has a link to the post the user has just created. The code looks like this:

<a href="https://website.com/?page_id={post_id}">{News Story Headline:1}</a>

Unfortunately, when you hover over the link in the notification, it renders as this:

https://website.com/?page_id=

Clicking on the link takes you to the home page.

I don’t understand why this isn’t working? Can anyone help explain the problem?

Thanks

Hi Perchpole,

If you’re trying to link to the post, you’ll have to add the “p” instead of the “page_id”.

<a href="https://domain.com/?p={post_id}">Click here</a>

Give it a try, and let me know how that goes! :smile:

Faisal -

Thanks for your response but you’ve missed the point! The issue is merge tag is not working.

This code…

<a href="https://domain.com/?p={post_id}">Click here</a>

Will create this link…

https://domain.com/?p=

The problem is the {post_id} merge tag doesn’t work every time.

Antar

The notification is most likely being sent before the post is created by the background feed processor. Try disabling background feed processing using the following filter in the theme functions.php file or with a code snippets plugin.

Hi, Richard -

Thanks. This sounds very promising. It might address a couple of other niggling issues that sometimes happen when creating a post - especially concerning image uploads.

Sometimes, when you create a post, and upload a featured image, the connection between the two isn’t fully “established”. If you go and share the post of Facebook, for example, the image won’t appear. You have to go into the admin and resave the post. Then share it on Facebook. Only then does the image appear.

I know it sounds odd but it is a very real issue!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.