Archive pagination – second page shows exactly the same posts

Put this code <div class=”row”> <div class=”col-md-8 col-md-offset-2″> <?php $args = array( ‘posts_per_page’ => 3, ‘post_type’ => ‘work’, ‘paged’ => get_query_var(‘paged’) ? get_query_var(‘paged’) : 1 ); $myposts = new WP_Query($args); ?> <?php single_term_title(); ?> <?php if ( $myposts->have_posts() ) : ?> <?php while ( $myposts->have_posts() ) : $myposts->the_post(); ?> <?php get_template_part( ‘content’, get_post_format() );?> <?php … Read more

WordPress update leads to 404 error on admin page and signup. CSS mishap with all plugin related functions

First of all never update production/live version, download it and try it locally or on dev server. http://bubblz.in/wp-admin seems working for me. Check do you have still page named login-page. For conflict css files you will need to remove them. add_action( ‘wp_enqueue_scripts’, ‘wp_remove_theme_enqueues’, 11 ); function wp_remove_theme_enqueues() { if( is_ThatPage()//search for that page ) { … Read more

File execution order

The problem is this: <script src=”http://w.sharethis.com/button/buttons.js”></script> Try to add this to the body or footer of your site and then remove the link to w.sharethis.com. Because this not a local js it will not be cached and this will show as a js / css error in pagespeed. You could save this as a local … Read more

Convert a custom bootsrap based menu to wordpress nav walker

The easier way is to use Wp Bootstrap Navwalker script here: https://github.com/wp-bootstrap/wp-bootstrap-navwalker. It’s already built to handle all the Bootstrap to WordPress dynamic styling. All you would need to do is include file in your functions.php file. require_once get_template_directory() . ‘/wp-bootstrap-navwalker.php’; And add the php code to the Bs Navbar links area of the code. … Read more

Pagenavi with archive page

It always displays the first page because you tell it to: ‘paged’ => ‘1’ 🙂 That said changing main query and especially pagination inside a template is inherently unreliable. For proper customization of such you should always be adjusting main query before template is ever reached via appropriate hooks, typically pre_get_posts.

Fatal error in wordpress

Access your server via FTP/ SFTP , or a file manager in your hosting account’s control panel (consult your hosting provider’s documentation for specifics on these), navigate to /wp-content/plugins/ and delete wordpress-seo plugins.