Clean all marks made by your cat scratching with warm water and soap This removes the “territory messages” left by your cat’s paws on the furniture. Follow cat scratching post “golden rules” Your post must be vertical, sturdy and tall enough: at least 90 cm Place near your cat’s sleeping area or close to the areas of unwanted scratching Have at least 1 post per cat This resource is essential as all cats need to scratch!
Cats can scratch inappropriately or excessively as a subtle way of showing that they are not completely happy, you can help:
Give them attention and love
Food and water bowls easily accessible (1 per cat if multiple cats)
Different levels and perches, scratching post 
Playtime, leave different toys, mix them up and play with them now and then – sometimes cats prefer a moving toy on the end of a string
This could also be because the scratching post is not the desired location and the carpet is
If your cat is scratching your carpet you can redirect on desired location 
Make sure scratching post is:
Sturdy, should not wobble when used
Tall enough, should allow your cat to fully stretch when scratching
Always available and accessible to them – not in a loud or scary area that is sometimes closed off
Or place it near where your cat sleeps – as they like to scratch when they wake up
Ideally have at least one scratching post per cat
Clean all identified scratched area (with just warm water or with simple soaps) to remove the scent 
Remove marks left by your cat(s).
If scratching is widespread in your house or your cat is particularly destructive, this may be an indicator that this may be due to stress. 
Cats need to scratch and flex their claws, and this is a natural
All cats will seek out surfaces that feel good and this can be a scratching post or your furniture
But the furniture may be inappropriate and you can change this
Clean all scratched areas or marks in the home (with just warm water or with simple soaps) to remove the scent which could attract your cat back
Remove marks left by your cat(s).
You need to make the scratching post as suitable and desirable as possible
Get a sturdy, good material, strong scratching post – high / long enough for your cat o stretch their body 
Put it in a good accessible location and make it desirable to your cat. 
Make sure there is at least one scratching post per cat in the household
In a suitable area, where they like to go often (ideally next to where they wake up)