Sometimes happens to me, that the (db) content of WP site is simply out-of-sync with the copy running on localhost. I'd like to do some changes, let's say add Pages and since I want to do it fast, I don't care about synchronisation (which means 1. sql dump download 2. sql import 3. modifications in wp_options).
In these cases of unsynchronized databases, I often encounter
the fact of different IDs: a new page created on
localhost first won't finally have the same post-ID online. Now, I need to use
in template a condition like is_page(...) — but I know, it will
work either on localhost or on the web. Following simple
switch-like-working function can be the solution.


