0
votes
1answer
913 views

Check if post id exist in table than only update instead of inserting new row

I am trying to add simple view counter for my advert and everything seems works fine with below code but only it is inserting each time new row on post "Update". What I want if the post id is exists ...
1
vote
0answers
82 views

Copy post to separate database with “add_action(…)”

I'm basically trying to have a copy of a post be sent to another database's table when it's published. I've gotten it to add a new row in the new table, with my own static arguments, but I'm not sure ...