Switch links from Blogger to WordPress error

Posted in: Newspaper
Post count: 25

Hi,

when if follow the instruction of how to Switch from Blogger to WordPress, links not working from blogger to wordpress it gives 404

i put this code in functions.php and also not working

function blogger_query_vars_filter( $vars ) {
$vars[] = “blogger”;
return $vars;
}

add_filter(‘query_vars’, ‘blogger_query_vars_filter’);

function blogger_template_redirect() {
global $wp_query;
$blogger = $wp_query->query_vars[‘blogger’];
if ( isset ( $blogger ) ) {
wp_redirect( get_wordpress_url ( $blogger ) , 301 );
exit;
}
}

add_action( ‘template_redirect’, ‘blogger_template_redirect’ );

function get_wordpress_url($blogger) {
if ( preg_match(‘@^(?:https?://)?([^/]+)(.*)@i’, $blogger, $url_parts) ) {
$query = new WP_Query (
array ( “meta_key” => “blogger_permalink”, “meta_value” => $url_parts[2] ) );
if ($query->have_posts()) {
$query->the_post();
$url = get_permalink();
}
wp_reset_postdata();
}
return $url ? $url : home_url();
}

how to solve this

Thanks

Post count: 25

??

Post count: 25

is the problem from the theme ??!

Post count: 22421

Hello,

Sorry for the late answer but we do not work on weekends: support hours are in the top right of this page.
Unfortunately we have no solution to provide as we have not tested changing from blogger to WordPress. Our theme will work only once you have your wordpress set up properly. Please switch to a wp default theme like twentysixteen and then import your content from blogger by following a few online guides: http://www.wpbeginner.com/wp-tutorials/how-to-switch-from-blogger-to-wordpress-without-losing-google-rankings/
After you have everything ready from the WordPress side, then install the theme and everything should run properly.

Thank you!

Post count: 25

also not working it directed to 404 page not found

Post count: 22421

If woprdpress is not working then we cannot help you in this matter. We are the theme support, not WordPress support. You need to have a working wordpress install to run the theme. We cannot offer supoport for wordpress as we have not created it. We only created a theme for it and can only provide support for the theme.
Thank you!

Post count: 22421

If woprdpress is not working then we cannot help you in this matter. We are the theme support, not WordPress support. You need to have a working wordpress install to run the theme. We cannot offer supoport for wordpress as we have not created it. We only created a theme for it and can only provide support for the theme.
Thank you!

Post count: 25

Thanks

Viewing 8 posts - 1 through 8 (of 8 total)
The forum ‘Newspaper’ is closed to new topics and replies.