34
Editor's Note: Sleep training. Been there done that. Got sick. Did it again. Got sick. Did it again. So forth and so on. Up until Alice-Kate was 5 months old, we would let her fall asleep at night while we gave her a bottle or I'd rock her to sleep, singing the song I've sang to her since the day she was born. It was special. It worked. She had been sleeping through the night since 9 weeks old (Success!). But to those of you who are parents, you'll know something happens around 5-6 months. Chalk it up to huge developmental milestones around the bend or gremlins, but around 5.5 months our sweet Alice-Kate just stopped sleeping through the night. She would wake up at least once a night ... and cry until she saw our faces over her crib ... at which point, she'd break into a huge grin and kick her legs in excitement. It was cute ... the first few times ... or every time, but you only smile so much at 2:30 am. Up until this point, I had labled the Cry It Out Method ... or CIO method for those "in the know"... as cruel and unusual. I mean, how could ANYONE just listen to their child cry!?!? BUT! Desperate times and all. Bottom line, Rick and I needed to sleep ... so as to function during the day and not lose our jobs. No matter how much we explained to AK that jobs were necessary for her to uphold the standard of living she was accustomed to ... she wasn't buying it. So ... being the avid researcher I am, I started studying up on this CIO nonsense. I had several friends who swore by it and assured me it was the way to go. After in-depth research ... okay ... it was like a day of some babycenter.com reading (but they offered several different opinions!), I took a deep breath and decided that I would begin sleep training via the Ferber method, which seemed less harsh to me. Okay ... that first night was torture. No, really. If we need a way to interrogate suspected terrorists, I think this is the way to go. Alice-Kate cried. I cried. Rick cried. Okay, he didn't, but it seemed to fit. It took 15 minutes, but she finally put herself to sleep. The second night was a record-breaking 5 minutes. After that, Alice-Kate seemed content to be put in her crib and soothe herself to sleep. Man, were we excited! THEN ... what I can only describe as the black hole of sickness struck our house in full force. Over a six week period (do not adjust your screen ... you read that correctly), we experienced (in this order) RSV, double ear infection, bronchiolitis, pink eye, awful cold, pink eye again, ear infection in the left ear, awful cold, ear infection in the right ear. Fun, right? I had been warned that this would completely undo sleep training, but I was optimistic. I should have looked at that glass as half empty. After A LOT of sleepless nights (and Rick spending about a month total sleeping in an upright position on the couch all night with AK in his arms), I'm happy to report that we are back to a happy home where we all lie down in our respective beds each night and SLEEP!
That was a really long Editor's Note. I'm sorry. If you've stuck with me thus far, gold star! See me after class. As a first time parent, there are certainly lots of things that make you feel completely incompetent and like a complete failure (i.e. colic). But then something magical happens.
Let me explain. I'm an awful parent. I'm an enabler. All the books warned against the dangers of "sleep crutches." But I didn't listen. Our little angel was swaddled until she was 4 months old (and, if truth be told, sometimes still at naptime at daycare. She's fiesty. She didn't get the name Sassafrass at daycare for no reason). BUT the swaddle isn't the worst. If you asked the experts, I might as well be giving Alice-Kate whiskey in the bottle at night. What could possibly be SO horrid, you ask? We let her sleep with a pacifier. *Gasp* Collect yourselves. I'll wait. Apparently, this is teaching her nothing about soothing herself, but is relying on a crutch to do it. Whatever. You take it away from her and see how long you last. Plus, don't we all kind of rely on sleep crutches, i.e. the perfect temperature and pillows at just the right angle? Anywhoooo ... it really hasn't been that awful. I mean, sure ... sometimes she rouses a little at night and I nudge Rick to go pop the pacifier back in her mouth, but what's two minutes to 8 hours?
But last night ... it was a Christmas miracle in March! Alice-Kate stirred letting out a couple of little fusses in the middle of the night. Immediately, I began doing the math in my head. "Okay. I went to bed at 10:30 ... it's 3:00. I mean, I can function on 3.5 hours of sleep. No biggie!" So, of course, I nudged Rick. "Will you go give her her pacifer?" Up he got. (Which is amazing in itself. Waking up him up in the middle of the night can award you with some pretty outlandish responses, but that's a post for another day ... or month.) BUT! Before he could get into her room, she spotted the pacifier at the top of her crib. Crawled up to it; grabbed it; popped in her mouth; and immediately dosed back off. It was in that moment that I felt successful as a parent.
35
36
37
38
Save your template, and you have successfully implemented redirection on your Blogger blog.
However, you still need to setup redirection on your WordPress site so that users are redirected to the proper posts.
You need to copy and paste the following code in your WordPress theme’s functions.php file or in a site-specific plugin.
If this is your first time adding code to your WordPress site, then you may want to check our beginner’s guide to pasting snippets from the web into WordPress.
01
function blogger_query_vars_filter( $vars ) {
02
$vars[] = "blogger";
03
return $vars;
04
}
05
06
add_filter('query_vars', 'blogger_query_vars_filter');
07
08
function blogger_template_redirect() {
09
global $wp_query;
10
$blogger = $wp_query->query_vars['blogger'];
11
if ( isset ( $blogger ) ) {
12
wp_redirect( get_wordpress_url ( $blogger ) , 301 );
13
exit;
14
}
15
}
16
17
add_action( 'template_redirect', 'blogger_template_redirect' );
18
19
function get_wordpress_url($blogger) {
20
if ( preg_match('@^(?:https?://)?([^/]+)(.*)@i', $blogger, $url_parts) ) {
21
$query = new WP_Query (
22
array ( "meta_key" => "blogger_permalink", "meta_value" => $url_parts[2] ) );
23
if ($query->have_posts()) {
24
$query->the_post();
25
$url = get_permalink();
26
}
27
wp_reset_postdata();
28
}
29
return $url ? $url : home_url();
30
}