How to modify specific parts of a post content in WordPress

Finally, I had to add the required code inside another shorcode I had in place to create the content structure. That way I avoided creating an extra shorcode and was able to put the custom code in the exact position I wanted.

Thanks to all those who helped.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)