-
27
-
05
-
2014
Kategorisi : Wordpress
SELECT a.ID, a.post_title, a.post_type, a.post_status
FROM wp_posts AS a
INNER JOIN (
SELECT post_title, MIN( id ) AS min_id
FROM wp_posts
WHERE post_type = 'post'
AND post_status = 'publish'
GROUP BY post_title
HAVING COUNT( * ) > 1
) AS b ON b.post_title = a.post_title
AND b.min_id <> a.id
AND a.post_type = 'post'
AND a.post_status = 'publish'
------------------------------------------
DELETE a.*
FROM wp_posts AS a
INNER JOIN (
SELECT post_title, MIN( id ) AS min_id
FROM wp_posts
WHERE post_type = 'post'
AND post_status = 'publish'
GROUP BY post_title
HAVING COUNT( * ) > 1
) AS b ON b.post_title = a.post_title
AND b.min_id <> a.id
AND a.post_type = 'post'
AND a.post_status = 'publish'
-
19
-
04
-
2014
Kategorisi : Wordpress
DELETE pm
FROM wp_postmeta pm
LEFT JOIN wp_posts wp ON wp.ID = pm.post_id
WHERE wp.ID IS NULL
-
18
-
02
-
2014
Kategorisi : Wordpress
DELETE a.*
FROM wp_posts AS a
INNER JOIN (
SELECT post_title, MIN( id ) AS min_id
FROM wp_posts
WHERE post_type = ‘post’
AND post_status = ‘publish’
GROUP BY post_title
HAVING COUNT( * ) > 1
) AS b ON b.post_title = a.post_title
AND b.min_id <> a.id
AND a.post_type = ‘post’
AND a.post_status = ‘publish’
-
13
-
02
-
2014
Kategorisi : Php,Wordpress
Her insert işleminden sonra taxonomy’i “_children” ile silmemiz gerekiyor. Mesela taxonomy = kategori ise ;
delete_option(“kategori_children”);
yazıyoruz.
wp_insert_term(
$kategori_adi,
‘category’,
array(
‘description’ => $aciklama,
//’slug’ => $slug,
‘parent’ => 0,
)
);
delete_option(“category_children”); //
-
10
-
10
-
2011
Kategorisi : Wordpress
http://ornek.com/
http://ornek.com/index.php
http://www.ornek.com/index.php
yönlendirmeyi engellemek için :
kullandığınız temadaki functions.php içerisine
remove_filter(‘template_redirect’,’redirect_canonical’);
kodunu ekliyoruz.
-
23
-
03
-
2011
Kategorisi : Wordpress
Öncelikle kurulum sırasında yorum ayarlarını düzgün yapılandırmak çok önemli tabii. Ancak zamanında bu ayarları yapmadıysak binlerce spam yorum ile karşılaşabiliyoruz. Hepsini tek seferde silmek için :
delete from wp_comments where comment_approved = '0'
sql komutunu çalıştırıyoruz.