Skip to content
Advertisement

Append post title before publishing the wordpress post

I want to append my wordpress titles to have some static text in them before publishing. As my posts are directly posting to social media when they are published, I want this to happen before publishing.. I tried several approaches but none of them are working. This does not work at all

JavaScript

Below code works but just replace the whole title with static text and do not capture text I entered in post title manually when writing the post

JavaScript

I also tried to_title but that just update the title in wordpress. Not in the post before publishing. Not sure if there is really a way to capture dynamic text entered in post and append. Please help.

Advertisement

Answer

Check that https://wordpress.stackexchange.com/a/35993

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement