• Премахване на Content sidebar от twentyfourteen ( WordPress)

    Идеята е да се премахне десният сайдбар (Content sidebar) на стандартната тема twentyfourteen  в WordPress. 1. прави се child , twentyfourteen-child 2. twentyfourteen-child/style.css /* Description: Child of theme by martin Author: Martin Petrov Version: 0.0.1 Template: twentyfourteen */ @import url(‘../twentyfourteen/style.css’); .hentry { max-width: 90%; } .site-content .entry-header, .site-content .entry-content, .site-content .entry-summary, .site-content .entry-meta, .page-content {…

  • Как да се разбере кои wordpress блогове имат много коментари

    Идеята е, че имаме много wordpress блогове на тази машина и много от тях са наспамени или просто имат много коментари. За да се следи прилагам просто решение: find /var/lib/mysql/ -type f -size +1000k -name „*_comments.MYD“ -exec ls -lh {} \; | awk ‘{ print $9 „: “ $5 }’ Резултат: /var/lib/mysql/vhostext/wp_comments.MYD: 1,8M Вижда, сече…

  • Изтриване на коментари в WordPress (през MySQL)

    Всички коментари се записват в табицата „wp_comments“ mysql> describe wp_comments; +–––––––-+–––––––+––+––+–––––––+–––––-+ | Field                | Type                | Null | Key | Default             | Extra          | +–––––––-+–––––––+––+––+–––––––+–––––-+ | comment_ID           | bigint(20) unsigned | NO   | PRI | NULL                | auto_increment | | comment_post_ID      | bigint(20) unsigned | NO   | MUL | 0                   |                | | comment_author       |…

  • Експорт на публикации от WordPress ползващ Thrive Content Builder

    Експорт на стандартна публикация <item>         <title>Заглавие</title>         <link>ПЪЛНО URL на публикацията(http://…)</link>         <pubDate>Mon, 08 Dec 2008 06:59:21 +0000</pubDate>         <dc:creator><![CDATA[admin]]></dc:creator>         <guid isPermaLink=“false“>http://mpetrov.net/?p=22</guid>         <description></description>         <content:encoded><![CDATA[Content]]></content:encoded>         <excerpt:encoded><![CDATA[]]></excerpt:encoded>         <wp:post_id>22</wp:post_id>         <wp:post_date>2008-12-08 08:59:21</wp:post_date>         <wp:post_date_gmt>2008-12-08 06:59:21</wp:post_date_gmt>         <wp:comment_status>open</wp:comment_status>         <wp:ping_status>open</wp:ping_status>…

  • Изтриване на всички постове от WordPress през MySQL

    #Листва постовете от категория 2 SELECT * FROM TABLE_PREFIX_posts p JOIN TABLE_PREFIX_term_relationships r ON p.ID = r.object_id JOIN TABLE_PREFIX_term_taxonomy tt ON r.term_taxonomy_id = tt.term_taxonomy_id JOIN TABLE_PREFIX_term_taxonomy t ON tt.term_id = t.term_id WHERE t.term_id = 2; #Листва всички постове SELECT * FROM TABLE_PREFIX_posts p JOIN TABLE_PREFIX_term_relationships r ON p.ID = r.object_id JOIN TABLE_PREFIX_term_taxonomy tt ON r.term_taxonomy_id…

  • Добавяне на администратор в WordPress от MySQL

    #Добавяне на тестов администратор INSERT INTO `TABLE_PREFIX_users` (`ID`, `user_login`, `user_pass`, `user_nicename`, `user_email`, `user_url`, `user_registered`, `user_activation_key`, `user_status`, `display_name`) VALUES (‘99999’, ‘martinwpmartin’, md5(‘superparola’), ‘Martin Petrov’, ‘[email protected]’, ‘http://mpetrov.net’, ‘2014-04-04 00:00:00’, “, ‘0’, ‘Martin Petrov’); INSERT INTO `TABLE_PREFIX_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, ‘99999’, ‘TABLE_PREFIX_capabilities’, ‘a:1:{s:13:“administrator“;s:1:“1″;}’); INSERT INTO `TABLE_PREFIX_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, ‘99999’, ‘TABLE_PREFIX_user_level’, ’10’);…

  • WordPress: Промяна на стандартното jquery в темплейт

    file: functions.php //Making jQuery Google API function modify_jquery() { if (!is_admin()) { // comment out the next two lines to load the local copy of jQuery wp_deregister_script(‘jquery’); wp_register_script(‘jquery’, ‘http://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js’, false, ‘1.8.1’); wp_enqueue_script(‘jquery’); } } add_action(‘init’, ‘modify_jquery’);