WPML language switcher for custom rewrite rules

A more simple solution for generating the rewrite rules would be to temporarily disable the WPML plugin. I did this using WP-CLI as follows: wp plugin deactivate sitepress-multilingual-cms wp rewrite flush wp plugin activate sitepress-multilingual-cms Note that this only works a single time. Each time you add/modify a category, the rewrite list is flushed and … Read more

Bypass “supress_filters” in WP Query

Looking at the WP_Query Class you should be able to use pre_get_posts to modify the query before any other filters are run, which includes turning off the suppress_filters flag. An example of this could be: /** * Modify WP_Queries * @link https://wordpress.stackexchange.com/q/356950/7355 * * @param WP_Query $query * * @return void */ function wpse356950_query_modifications( $query … Read more

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