How to add paging to query

Rather than using next_posts_link and previous_posts_link, try paginate_links. It lets you specify the current page and total page count. For example: echo paginate_links( array( ‘base’ => add_query_arg( ‘cpage’, ‘%#%’ ), ‘format’ => ”, ‘prev_text’ => __(‘«’), ‘next_text’ => __(‘»’), ‘total’ => ceil($total / $items_per_page), ‘current’ => $page ));

How to set path with WP_Filesystem and ftp base / chroot

After changing FTP_BASE in my wp-config i found the update function of WP broken. Then i realize the update function work the same way and don’t need any additional settings. In wp-admin/includes/update-core.php i found the usage of $wp_filesystem->wp_content_dir(). This solves my problem too. On http://xref.wordpress.org/branches/3.8/WordPress/Filesystem/WP_Filesystem_Base.html you will find a list of possible useful functions: string … Read more

Subdirectory install error

I had forgotten to define the location of wp-content in my wp-config.php : define( ‘WP_CONTENT_DIR’, dirname(__FILE__) . ‘/wp-content’ ); define( ‘WP_CONTENT_URL’, ‘http://’.$_SERVER[‘SERVER_NAME’].’/wp-content’ ); define( ‘WP_PLUGIN_DIR’, dirname(__FILE__) . ‘/wp-content/plugins’ );

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)