Separate Database Tables For Different Post Types

So the only reason you want to re-architect WordPress to use multiple tables for different post types is because your posts table is getting bigger too fast? I assume the underlying issue for you is that performance is suffering? Instead, I suggest adding appropriate indexes to the post table for the queries you are finding … Read more

Make Google index the entire post if it is separated into several pages

The basic problem for a script solution is: rel_canonical does not offer any useful filter. So we have to replace that function: remove_action( ‘wp_head’, ‘rel_canonical’ ); add_action( ‘wp_head’, ‘t5_canonical_subpages’ ); The next problem: $GLOBALS[‘numpages’] is empty before setup_postdata(). We could call that function already here, but it might have side-effects. Here is a solution that … Read more

Set Alias for meta_query arguments in get_posts()

Have a look at the meta_query_find_compatible_table_alias filter defined in wp-includes/class-wp-meta-query.php. This filter’s documentation: /** * Filters the table alias identified as compatible with the current clause. * * @since 4.1.0 * * @param string|bool $alias Table alias, or false if none was found. * @param array $clause First-order query clause. * @param array $parent_query Parent … Read more

WP_Query leaking absurd amounts of memory

Excellent responses on WP Hackers: http://lists.automattic.com/pipermail/wp-hackers/2012-June/043213.html What you’re doing with that query, is loading EVERY matching post into memory, including the full post contents. As you can imagine, this is probably quite a lot of items. You can pass ‘fields’ => ‘ids’ into WP_Query to simply return a list of matching post_ids instead, which should … Read more

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