Why does WP allow duplicate pages with the same name?

I think I found the issue. It looks WPML, the translation plugin, makes a duplicate page for every translated version of a page. So we had multiples of a few pages that were translated into various languages. Sidenote: WPML stopped working a couple months ago and none of their fixes have worked yet. So no … Read more

wp delete duplicate entries of custom post types every 15 minutes

Start by ensuring that there is actually a 15min interval available. // create the cron scheduled interval to be used add_filter(‘cron_schedules’,’ex11_cron_schedules’); function ex11_cron_schedules($schedules){ if(!isset($schedules[“15min”])){ $schedules[“15min”] = array( ‘interval’ => 15*60, ‘display’ => __(‘Once every 15 minutes’)); } return $schedules; } Then create a custom WP_Query loop to fetch all the records you need to compare, … Read more

Display custom posts, ordered by most commented, without duplicates

Currently, it looks like you are looping through comments and then querying the posts from there. Could you use the comment_count order by parameter directly in the posts query itself? For example: <?php $post_args = array( ‘post_type’ => ‘portfolio’, ‘posts_per_page’ => 1, ‘orderby’ => ‘comment_count’ ); $posts = get_posts($post_args); foreach ($posts as $post) : setup_postdata($post); … Read more

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