How to get post ID after removing that post?

There’s only one way I can see that you can get the ID after a post is deleted. If you’re using wp_delete_post to delete posts, you add a after_delete_post action hook where you will then do the other stuff that you need to do like the remove of page from sitemap, etc. The hook has … Read more

how to add urls dynamically into the sitemap

Looks like one of those is the canonical URL, can you take a look at the page source and check if is there a canonical tag? <link rel=”canonical”… Also there is a setting in yoast for the sitemap https://kb.yoast.com/kb/how-to-customize-the-sitemap-index/ and you can add your own sitemap too: https://kb.yoast.com/kb/add-external-sitemap-to-index/ Note: Duplicate content will harm your SEO … Read more

load_textdomain won’t load my .mo file

I found the answer: load_textdomain( ‘site-map’, TEMPLATEPATH.’/partials/languages’ ); … gives the path of the folder containing the .mo file. but the path of every individual mo file should be used in its own load_textdomain instruction : load_textdomain(‘site-map’, TEMPLATEPATH.’/partials/languages/site-map-fr_FR.mo’); load_textdomain(‘site-map’, TEMPLATEPATH.’/partials/languages/site-map-en_US.mo’); load_textdomain(‘site-map’, TEMPLATEPATH.’/partials/languages/site-map-es_ES.mo’); load_textdomain(‘site-map’, TEMPLATEPATH.’/partials/languages/site-map-ru_RU.mo’); load_textdomain(‘site-map’, TEMPLATEPATH.’/partials/languages/site-map-de_DE.mo’); Shame on me it is a very obvious and … Read more