34
So clearly hubs and I have made it safe and sound. We made it to our new home in Calabasas, CA (yes, where the Kardashians live) tired but seemingly unscathed. We've been tirelessly settling and trying to get our home in a livable state. It's close, so very close. Pics will be posted in a very timely manner, as soon as a couch is acquired.
I have to say, this whole experience of settling in has left me with a love/hate relationship with IKEA. Some of their stuff is great, on the cheaper side and can be molded to look just like you want it...AKA...not a generic piece of Swedish furniture from a box you have to assemble with Satan's tool...the Allen wrench. We opted for this bed...it's a looker and it goes with the other pieces of our IKEA bedroom. I decided to let husband work on the other pieces we purchased along with the bed. I figured "how hard could this be." Famous last words right?
Actually, the bed was coming together quite smoothly, page 25 of the instructions and almost complete...until I found that I needed pieces that didn't seem to exist. I checked, rechecked and checked a third time in the pile of boxes from all the all-assembly-required furniture and yet, nothing. They simply were not there. All that stood between us and blissful sleep on our new bed were four measly rods and a center support beam that just were not in the box. BLAST! I was so defeated. I was so sure I could do it all on my own, without husband's help and yet, the Swedes decided to have a little fun at my expense. So the very next day we trekked back to Burbank to acquire said pieces. The guy at customer service simply snickered and said "Oh, that piece (speaking of the support beam), yeah it comes separate." Like we were supposed to know that! He apologized for the missing rods, handed them to us and pointed us to the Aisle and Bin the support beam could be found. Of course it was when we got to the Aisle and Bin...there was a sign clearly stating "YOU NEED THIS TO ASSEMBLE YOUR BED." Whatever...
So the bed is done, the room is pretty...now about that couch...
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
}