AlexOff
Ответы в темах
-
Форум: Проблемы и решения
Тема: Редирект через go.phpнет. интересует именно редирект на сторонний сайт с оповещением пользователя, что он переходит на другой ресурс
Неужели никто не знает, как сделать ??? (((
Гуглил, пока глаза не устали, ничего не нашел ((( Help !
Форум: Проблемы и решения
Тема: Browser Check PageСтранно, очень странно. Если я правильно понял, то так валидатор видит твой исходный код. Хотя если его открыть через браузер, то все тип-топ. Может быть где-то в хатцессе касяк ??? Из серии стоит запрет для каких-нибудь роботов. Вот и валидатору отдается такой код.
В кеше гугла и яндекса все нормально отображается. Так что особо не парься. Поисковики нормально индексируют сайт.
Форум: Проблемы и решения
Тема: Browser Check PageМожно донора увидеть ?
Строки
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE"> <META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE"> <META HTTP-EQUIV="REFRESH" CONTENT="0;">
Вообще можно удалить. Эти метатеги потеряли свою актуальность еще лет 5 назад
Форум: Проблемы и решения
Тема: Как опубликовать сайЕсли с доменом и хостингом разобрались, то создайте на хостинге базу для блога. А дальше все просто по инструкции: http://codex.wordpress.org/Новичкам_в_WordPress_—_С_чего_начать и http://codex.wordpress.org/Установка_WordPress
Юрий, спасибо Вам большое за Ваши труды. Если я правильно понял, то данные запросы создает плагин Avatars. Использую его для пользовательских аватаров в блоге (для активных пользователей), если пользователь не зарегистрирован в граватаре.
Деактивировал его в админке, минус 4 запроса к базе. Постараюсь найти альтернативу без использования плагинов.
Подскажите пожалуйста, 44 запроса к базе при наличии 2-х комментариев — это нормально для wordpress или надо копать глубже ?
Сейчас попробую по отключать плагины, связанные с комментариями, о результатах отпишусь.
Пытался понять сам, что к чему, но не разобрался ((( Вот мой файл comments.php
Буду рад любой помощи, т.к. посещаемость потихоньку растет, и некоторые пользователи жалуются, что сайт бывает недоступен. Подозреваю, что это из-за единовременных нагрузок на базу. Хостинг вроди как стабильный.
<?php /** * @package WordPress * @subpackage Default_Theme */ // Do not delete these lines if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME'])) die ('Please do not load this page directly. Thanks!'); if ( post_password_required() ) { ?> <h2 id="post-header">Эта запись защищена паролем. Введите пароль для просмотра комментариев.</h2> <?php return; } ?> <!-- You can start editing here. --> <div id="commentpost"> <?php if ( have_comments() ) : ?> <?php if ( ! empty($comments_by_type['comment']) ) : ?> <h4 id="comments"><?php comments_number('Пока нет комментариев.', 'Есть 1 комментарий.', 'Есть % коммент.');?> к “<?php the_title(); ?>”</h4> <div id="post-navigator-single"> <div class="alignleft"><?php previous_comments_link() ?></div> <div class="alignright"><?php next_comments_link() ?></div> </div> <ol class="commentlist"> <?php wp_list_comments('type=comment'); ?> </ol> <div id="post-navigator-single"> <div class="alignleft"><?php previous_comments_link() ?></div> <div class="alignright"><?php next_comments_link() ?></div> </div> <?php endif; ?> <?php if ( ! empty($comments_by_type['pings']) ) : ?> <h4>Trackbacks/Pingbacks</h4> <ol class="pinglist"> <?php wp_list_comments('type=pings&callback=list_pings'); ?> </ol> <?php endif; ?> <?php else : // this is displayed if there are no comments so far ?> <?php if ('open' == $post->comment_status) : ?> <!-- If comments are open, but there are no comments. --> <?php else : // comments are closed ?> <!-- If comments are closed. --> <h2 id="post-header">Комментарии закрыты.</h2> <?php endif; ?> <?php endif; ?> <?php if ('open' == $post->comment_status) : ?> <div id="respond"> <!-- google_ad_section_end --> <h4><?php comment_form_title( 'Оставить след', 'Оставить след к %s' ); ?></h4> <div class="cancel-comment-reply"> <?php cancel_comment_reply_link(); ?> </div> <?php if ( get_option('comment_registration') && !$user_ID ) : ?> <p>Вы должны <a href="/wp-login.php?redirect_to=<?php echo urlencode(get_permalink()); ?>">войти</a> чтобы комментировать.</p> <?php else : ?> <form action="/wp-comments-post.php" method="post" id="cf"> <?php if ( $user_ID ) : ?> <p>Вы вошли как: <noindex><a href="/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo wp_logout_url(get_permalink()); ?>" title="Выйти из аккаунта">Выход »</a></noindex></p> <?php else : ?> <p> <label for="author"><small>Ваше имя <?php if ($req) echo "(обязательно)"; ?></small></label><br /> <input type="text" class="tf" name="author" id="author" value="<?php echo $comment_author; ?>" <?php if ($req) echo "aria-required='true'"; ?> /> </p> <p> <label for="email"><small>Ваша почта (не публикуется) <?php if ($req) echo "(обязательно)"; ?></small></label><br /> <input type="text" class="tf" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" <?php if ($req) echo "aria-required='true'"; ?> /> </p> <?php endif; ?> <textarea name="comment" id="comment" cols="50%" rows="8" class="af"></textarea> <script type="text/javascript"> function addsmile($smile){ document.getElementById('comment').value=document.getElementById('comment').value+' '+$smile+' '; } </script> <?php global $wpsmiliestrans; $dm_showsmiles = ''; $dm_smiled = array(); foreach ($wpsmiliestrans as $tag => $dm_smile) { if (!in_array($dm_smile,$dm_smiled)) { $dm_smiled[] = $dm_smile; $tag = str_replace(' ', '', $tag); $dm_showsmiles .= '<img src="/wp-includes/images/smilies/'.$dm_smile.'" alt="'.$tag.'" onclick="addsmile(\''.$tag.'\');"/> '; } } echo '<div class="smile">'.$dm_showsmiles.'</div>'; ?><br /> <div> <input name="submit" type="submit" class="st" value="Отправить" id="submit" alt="Отправить свой комментарий" /> </div> <?php comment_id_fields(); ?> <?php do_action('comment_form', $post->ID); ?> </form> <?php endif; // If registration required and not logged in ?> </div> <?php endif; // if you delete this the sky will fall on your head ?> </div>
Хммммм. Печальное известие. Искать причину как я понимаю надо в файле comments.php. Верно ?
wikicms, спасибо большое. Вот что мне выдалось по посту с 2 комментариями (48 запросов)
Array ( [0] => Array ( [0] => SELECT option_name, option_value FROM wp_options WHERE autoload = 'yes' [1] => 0.00051498413085938 [2] => require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), wp_not_installed, is_blog_installed, wp_load_alloptions ) [1] => Array ( [0] => SELECT option_value FROM wp_options WHERE option_name = 'prt_phpbb_db' LIMIT 1 [1] => 0.00010395050048828 [2] => require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), include_once('/plugins/phpbb-recent-topics/phpbb_recent_topics.php'), require_once('/plugins/phpbb-recent-topics/upgrade.php'), get_option ) [2] => Array ( [0] => SELECT option_value FROM wp_options WHERE option_name = 'wpseo_internallinks' LIMIT 1 [1] => 8.392333984375E-5 [2] => require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), include_once('/plugins/wordpress-seo/wp-seo.php'), get_wpseo_options, get_option ) [3] => Array ( [0] => SELECT * FROM wp_users WHERE user_login = 'admin' [1] => 0.00011086463928223 [2] => require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), WP->init, wp_get_current_user, get_currentuserinfo, wp_validate_auth_cookie, get_user_by, WP_User::get_data_by ) [4] => Array ( [0] => SELECT user_id, meta_key, meta_value FROM wp_usermeta WHERE user_id IN (1) [1] => 0.00010895729064941 [2] => require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), WP->init, wp_get_current_user, get_currentuserinfo, wp_validate_auth_cookie, get_user_by, WP_User->init, WP_User->for_blog, WP_User->_init_caps, get_user_meta, get_metadata, update_meta_cache ) [5] => Array ( [0] => SELECT option_value FROM wp_options WHERE option_name = 'theme_switched' LIMIT 1 [1] => 0.0001068115234375 [2] => require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('init'), call_user_func_array, check_theme_switched, get_option ) [6] => Array ( [0] => SELECT ID, post_name, post_parent, post_type FROM wp_posts WHERE post_name IN ('news','23-february-2013') AND (post_type = 'page' OR post_type = 'attachment') [1] => 0.00053787231445312 [2] => require('wp-blog-header.php'), wp, WP->main, WP->parse_request, get_page_by_path ) [7] => Array ( [0] => SELECT wp_posts.* FROM wp_posts WHERE 1=1 AND wp_posts.post_name = '23-february-2013' AND wp_posts.post_type = 'post' ORDER BY wp_posts.post_date DESC [1] => 0.00039410591125488 [2] => require('wp-blog-header.php'), wp, WP->main, WP->query_posts, WP_Query->query, WP_Query->get_posts ) [8] => Array ( [0] => SELECT t.*, tt.*, tr.object_id FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON tt.term_id = t.term_id INNER JOIN wp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ('category', 'post_tag', 'post_format') AND tr.object_id IN (5259) ORDER BY t.name ASC [1] => 0.010036945343018 [2] => require('wp-blog-header.php'), wp, WP->main, WP->query_posts, WP_Query->query, WP_Query->get_posts, update_post_caches, update_object_term_cache, wp_get_object_terms ) [9] => Array ( [0] => SELECT post_id, meta_key, meta_value FROM wp_postmeta WHERE post_id IN (5259) [1] => 0.00027680397033691 [2] => require('wp-blog-header.php'), wp, WP->main, WP->query_posts, WP_Query->query, WP_Query->get_posts, update_post_caches, update_postmeta_cache, update_meta_cache ) [10] => Array ( [0] => SELECT t.*, tt.* FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON t.term_id = tt.term_id WHERE tt.taxonomy IN ('category') AND t.slug = 'news' ORDER BY t.name ASC [1] => 9.5844268798828E-5 [2] => require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), do_action('template_redirect'), call_user_func_array, redirect_canonical, get_category_by_path, get_terms ) [11] => Array ( [0] => SELECT tr.term_taxonomy_id FROM wp_term_relationships AS tr INNER JOIN wp_term_taxonomy AS tt ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tr.object_id IN (5259) AND tt.taxonomy IN ('category') ORDER BY tr.term_taxonomy_id ASC [1] => 0.0002899169921875 [2] => require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), do_action('template_redirect'), call_user_func_array, redirect_canonical, wp_get_object_terms ) [12] => Array ( [0] => SELECT * FROM wp_comments WHERE comment_post_ID = 5259 AND (comment_approved = '1' OR ( user_id = 1 AND comment_approved = '0' ) ) ORDER BY comment_date_gmt [1] => 0.00055789947509766 [2] => require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/ek9/single.php'), comments_template ) [13] => Array ( [0] => SELECT * FROM wp_users WHERE user_email = 'email@mail.ru' [1] => 8.392333984375E-5 [2] => require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/ek9/single.php'), comments_template, require('/themes/ek9/comments.php'), wp_list_comments, Walker->paged_walk, Walker_Comment->display_element, Walker->display_element, call_user_func_array, Walker_Comment->start_el, get_avatar, get_user_by_email, get_user_by, WP_User::get_data_by ) [14] => Array ( [0] => SELECT user_id, meta_key, meta_value FROM wp_usermeta WHERE user_id IN (5) [1] => 7.9870223999023E-5 [2] => require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/ek9/single.php'), comments_template, require('/themes/ek9/comments.php'), wp_list_comments, Walker->paged_walk, Walker_Comment->display_element, Walker->display_element, call_user_func_array, Walker_Comment->start_el, get_avatar, get_user_by_email, get_user_by, WP_User->init, WP_User->for_blog, WP_User->_init_caps, get_user_meta, get_metadata, update_meta_cache ) [15] => Array ( [0] => SELECT meta_value FROM wp_usermeta WHERE user_id = 5 AND meta_key = 'avatar' [1] => 7.3909759521484E-5 [2] => require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/ek9/single.php'), comments_template, require('/themes/ek9/comments.php'), wp_list_comments, Walker->paged_walk, Walker_Comment->display_element, Walker->display_element, call_user_func_array, Walker_Comment->start_el, get_avatar, get_usermeta ) [16] => Array ( [0] => SELECT COUNT(*) as comments FROM wp_comments WHERE comment_author='Серега_SV' [1] => 7.1048736572266E-5 [2] => require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/ek9/single.php'), comments_template, require('/themes/ek9/comments.php'), wp_list_comments, Walker->paged_walk, Walker_Comment->display_element, Walker->display_element, call_user_func_array, Walker_Comment->start_el, get_comment_author_link, apply_filters('get_comment_author_link'), call_user_func_array, remove_nofollow_author ) [17] => Array ( [0] => SELECT user_email FROM wp_users WHERE user_email='email@mail.ru' [1] => 7.2002410888672E-5 [2] => require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/ek9/single.php'), comments_template, require('/themes/ek9/comments.php'), wp_list_comments, Walker->paged_walk, Walker_Comment->display_element, Walker->display_element, call_user_func_array, Walker_Comment->start_el, get_comment_author_link, apply_filters('get_comment_author_link'), call_user_func_array, remove_nofollow_author ) [18] => Array ( [0] => SELECT COUNT(1) as comments FROM wp_comments WHERE comment_author_email='email@mail.ru' [1] => 7.7962875366211E-5 [2] => require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/ek9/single.php'), comments_template, require('/themes/ek9/comments.php'), wp_list_comments, Walker->paged_walk, Walker_Comment->display_element, Walker->display_element, call_user_func_array, Walker_Comment->start_el, comment_text, apply_filters('comment_text'), call_user_func_array, remove_nofollow_text ) [19] => Array ( [0] => SELECT user_email FROM wp_users WHERE user_email='email@mail.ru' [1] => 7.4863433837891E-5 [2] => require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/ek9/single.php'), comments_template, require('/themes/ek9/comments.php'), wp_list_comments, Walker->paged_walk, Walker_Comment->display_element, Walker->display_element, call_user_func_array, Walker_Comment->start_el, comment_text, apply_filters('comment_text'), call_user_func_array, remove_nofollow_text ) [20] => Array ( [0] => SELECT meta_value FROM wp_usermeta WHERE user_id = 1 AND meta_key = 'avatar' [1] => 7.6055526733398E-5 [2] => require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/ek9/single.php'), comments_template, require('/themes/ek9/comments.php'), wp_list_comments, Walker->paged_walk, Walker_Comment->display_element, Walker->display_element, Walker_Comment->display_element, Walker->display_element, call_user_func_array, Walker_Comment->start_el, get_avatar, get_usermeta ) [21] => Array ( [0] => SELECT COUNT(*) as comments FROM wp_comments WHERE comment_author='Alex' [1] => 7.6055526733398E-5 [2] => require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/ek9/single.php'), comments_template, require('/themes/ek9/comments.php'), wp_list_comments, Walker->paged_walk, Walker_Comment->display_element, Walker->display_element, Walker_Comment->display_element, Walker->display_element, call_user_func_array, Walker_Comment->start_el, get_comment_author_link, apply_filters('get_comment_author_link'), call_user_func_array, remove_nofollow_author ) [22] => Array ( [0] => SELECT user_email FROM wp_users WHERE user_email='email@ya.ru' [1] => 7.2002410888672E-5 [2] => require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/ek9/single.php'), comments_template, require('/themes/ek9/comments.php'), wp_list_comments, Walker->paged_walk, Walker_Comment->display_element, Walker->display_element, Walker_Comment->display_element, Walker->display_element, call_user_func_array, Walker_Comment->start_el, get_comment_author_link, apply_filters('get_comment_author_link'), call_user_func_array, remove_nofollow_author ) [23] => Array ( [0] => SELECT COUNT(1) as comments FROM wp_comments WHERE comment_author_email='email@ya.ru' [1] => 7.7962875366211E-5 [2] => require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/ek9/single.php'), comments_template, require('/themes/ek9/comments.php'), wp_list_comments, Walker->paged_walk, Walker_Comment->display_element, Walker->display_element, Walker_Comment->display_element, Walker->display_element, call_user_func_array, Walker_Comment->start_el, comment_text, apply_filters('comment_text'), call_user_func_array, remove_nofollow_text ) [24] => Array ( [0] => SELECT user_email FROM wp_users WHERE user_email='email@ya.ru' [1] => 7.4863433837891E-5 [2] => require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/ek9/single.php'), comments_template, require('/themes/ek9/comments.php'), wp_list_comments, Walker->paged_walk, Walker_Comment->display_element, Walker->display_element, Walker_Comment->display_element, Walker->display_element, call_user_func_array, Walker_Comment->start_el, comment_text, apply_filters('comment_text'), call_user_func_array, remove_nofollow_text ) [25] => Array ( [0] => DESC wp_comments [1] => 0.0071310997009277 [2] => require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/ek9/single.php'), comments_template, require('/themes/ek9/comments.php'), do_action('comment_form'), call_user_func_array, show_subscription_checkbox, sg_subscribe_start, sg_subscribe->sg_subscribe, sg_subscribe->db_upgrade_check ) [26] => Array ( [0] => SELECT p.id FROM wp_posts AS p WHERE p.post_date < '2013-02-23 05:27:23' AND p.post_type = 'post' AND p.post_status = 'publish' ORDER BY p.post_date DESC LIMIT 1 [1] => 0.00032210350036621 [2] => require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/ek9/single.php'), include('/themes/ek9/paginate.php'), previous_post_link, adjacent_post_link, get_adjacent_post ) [27] => Array ( [0] => SELECT * FROM wp_posts WHERE ID = 5248 LIMIT 1 [1] => 0.00024604797363281 [2] => require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/ek9/single.php'), include('/themes/ek9/paginate.php'), previous_post_link, adjacent_post_link, get_adjacent_post, get_post, WP_Post::get_instance ) [28] => Array ( [0] => SELECT t.*, tt.* FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON tt.term_id = t.term_id INNER JOIN wp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ('category') AND tr.object_id IN (5248) ORDER BY t.name ASC [1] => 0.0063760280609131 [2] => require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/ek9/single.php'), include('/themes/ek9/paginate.php'), previous_post_link, adjacent_post_link, get_permalink, get_the_category, get_the_terms, wp_get_object_terms ) [29] => Array ( [0] => SELECT p.id FROM wp_posts AS p WHERE p.post_date > '2013-02-23 05:27:23' AND p.post_type = 'post' AND p.post_status = 'publish' ORDER BY p.post_date ASC LIMIT 1 [1] => 0.00031089782714844 [2] => require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/ek9/single.php'), include('/themes/ek9/paginate.php'), next_post_link, adjacent_post_link, get_adjacent_post ) [30] => Array ( [0] => SELECT * FROM wp_posts WHERE ID = 5283 LIMIT 1 [1] => 0.00021815299987793 [2] => require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/ek9/single.php'), include('/themes/ek9/paginate.php'), next_post_link, adjacent_post_link, get_adjacent_post, get_post, WP_Post::get_instance ) [31] => Array ( [0] => SELECT t.*, tt.* FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON tt.term_id = t.term_id INNER JOIN wp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ('category') AND tr.object_id IN (5283) ORDER BY t.name ASC [1] => 0.0060250759124756 [2] => require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/ek9/single.php'), include('/themes/ek9/paginate.php'), next_post_link, adjacent_post_link, get_permalink, get_the_category, get_the_terms, wp_get_object_terms ) [32] => Array ( [0] => SELECT DISTINCT ID, post_title, post_password, comment_ID, comment_post_ID, comment_author, comment_author_email, comment_date_gmt, comment_approved, comment_type,comment_author_url, SUBSTRING(comment_content,1,50) AS com_excerpt FROM wp_comments LEFT OUTER JOIN wp_posts ON (wp_comments.comment_post_ID = wp_posts.ID) WHERE comment_approved = '1' AND comment_type = '' AND post_password = '' ORDER BY comment_date_gmt DESC LIMIT 4 [1] => 0.00013113021850586 [2] => require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/ek9/single.php'), get_sidebar, locate_template, load_template, require_once('/themes/ek9/sidebar.php'), get_avatar_recent_comment ) [33] => Array ( [0] => SELECT * FROM wp_posts WHERE ID = 4511 LIMIT 1 [1] => 0.00020003318786621 [2] => require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/ek9/single.php'), get_sidebar, locate_template, load_template, require_once('/themes/ek9/sidebar.php'), get_avatar_recent_comment, get_permalink, get_post, WP_Post::get_instance ) [34] => Array ( [0] => SELECT t.*, tt.* FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON tt.term_id = t.term_id INNER JOIN wp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ('category') AND tr.object_id IN (4511) ORDER BY t.name ASC [1] => 7.4863433837891E-5 [2] => require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/ek9/single.php'), get_sidebar, locate_template, load_template, require_once('/themes/ek9/sidebar.php'), get_avatar_recent_comment, get_permalink, get_the_category, get_the_terms, wp_get_object_terms ) [35] => Array ( [0] => SELECT * FROM wp_posts WHERE ID = 4239 LIMIT 1 [1] => 9.3936920166016E-5 [2] => require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/ek9/single.php'), get_sidebar, locate_template, load_template, require_once('/themes/ek9/sidebar.php'), get_avatar_recent_comment, get_permalink, get_post, WP_Post::get_instance ) [36] => Array ( [0] => SELECT t.*, tt.* FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON tt.term_id = t.term_id INNER JOIN wp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ('category') AND tr.object_id IN (4239) ORDER BY t.name ASC [1] => 7.6055526733398E-5 [2] => require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/ek9/single.php'), get_sidebar, locate_template, load_template, require_once('/themes/ek9/sidebar.php'), get_avatar_recent_comment, get_permalink, get_the_category, get_the_terms, wp_get_object_terms ) [37] => Array ( [0] => SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts WHERE 1=1 AND wp_posts.post_type = 'post' AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'private') ORDER BY wp_posts.post_date DESC LIMIT 0, 5 [1] => 6.9856643676758E-5 [2] => require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/ek9/single.php'), get_footer, locate_template, load_template, require_once('/themes/ek9/footer.php'), query_posts, WP_Query->query, WP_Query->get_posts ) [38] => Array ( [0] => SELECT FOUND_ROWS() [1] => 0.00011587142944336 [2] => require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/ek9/single.php'), get_footer, locate_template, load_template, require_once('/themes/ek9/footer.php'), query_posts, WP_Query->query, WP_Query->get_posts, WP_Query->set_found_posts ) [39] => Array ( [0] => SELECT wp_posts.* FROM wp_posts WHERE ID IN (5419,5398,5300) [1] => 0.0003509521484375 [2] => require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/ek9/single.php'), get_footer, locate_template, load_template, require_once('/themes/ek9/footer.php'), query_posts, WP_Query->query, WP_Query->get_posts, _prime_post_caches ) [40] => Array ( [0] => SELECT t.*, tt.*, tr.object_id FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON tt.term_id = t.term_id INNER JOIN wp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ('category', 'post_tag', 'post_format') AND tr.object_id IN (5300, 5398, 5419) ORDER BY t.name ASC [1] => 0.0069489479064941 [2] => require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/ek9/single.php'), get_footer, locate_template, load_template, require_once('/themes/ek9/footer.php'), query_posts, WP_Query->query, WP_Query->get_posts, _prime_post_caches, update_post_caches, update_object_term_cache, wp_get_object_terms ) [41] => Array ( [0] => SELECT post_id, meta_key, meta_value FROM wp_postmeta WHERE post_id IN (5300,5398,5419) [1] => 0.00035190582275391 [2] => require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/ek9/single.php'), get_footer, locate_template, load_template, require_once('/themes/ek9/footer.php'), query_posts, WP_Query->query, WP_Query->get_posts, _prime_post_caches, update_post_caches, update_postmeta_cache, update_meta_cache ) [42] => Array ( [0] => SELECT wp_posts.* FROM wp_posts WHERE 1=1 AND wp_posts.ID IN (487) AND wp_posts.post_type = 'post' AND (wp_posts.post_status = 'publish') ORDER BY wp_posts.post_date DESC [1] => 0.00011205673217773 [2] => require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/ek9/single.php'), get_footer, locate_template, load_template, require_once('/themes/ek9/footer.php'), query_posts, WP_Query->query, WP_Query->get_posts, get_posts, WP_Query->query, WP_Query->get_posts ) [43] => Array ( [0] => SELECT t.*, tt.*, tr.object_id FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON tt.term_id = t.term_id INNER JOIN wp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ('category', 'post_tag', 'post_format') AND tr.object_id IN (487) ORDER BY t.name ASC [1] => 9.3936920166016E-5 [2] => require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/ek9/single.php'), get_footer, locate_template, load_template, require_once('/themes/ek9/footer.php'), query_posts, WP_Query->query, WP_Query->get_posts, get_posts, WP_Query->query, WP_Query->get_posts, update_post_caches, update_object_term_cache, wp_get_object_terms ) [44] => Array ( [0] => SELECT post_id, meta_key, meta_value FROM wp_postmeta WHERE post_id IN (487) [1] => 8.2969665527344E-5 [2] => require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/ek9/single.php'), get_footer, locate_template, load_template, require_once('/themes/ek9/footer.php'), query_posts, WP_Query->query, WP_Query->get_posts, get_posts, WP_Query->query, WP_Query->get_posts, update_post_caches, update_postmeta_cache, update_meta_cache ) [45] => Array ( [0] => SELECT t.*, tt.*, tr.object_id FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON tt.term_id = t.term_id INNER JOIN wp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ('category', 'post_tag', 'post_format') AND tr.object_id IN (5283) ORDER BY t.name ASC [1] => 8.702278137207E-5 [2] => require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/ek9/single.php'), get_footer, locate_template, load_template, require_once('/themes/ek9/footer.php'), query_posts, WP_Query->query, WP_Query->get_posts, update_post_caches, update_object_term_cache, wp_get_object_terms ) [46] => Array ( [0] => SELECT post_id, meta_key, meta_value FROM wp_postmeta WHERE post_id IN (5283) [1] => 8.2015991210938E-5 [2] => require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/ek9/single.php'), get_footer, locate_template, load_template, require_once('/themes/ek9/footer.php'), query_posts, WP_Query->query, WP_Query->get_posts, update_post_caches, update_postmeta_cache, update_meta_cache ) [47] => Array ( [0] => SELECT t.*, tt.* FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON t.term_id = tt.term_id WHERE tt.taxonomy IN ('post_tag') AND tt.count > 0 ORDER BY tt.count DESC LIMIT 45 [1] => 0.00012898445129395 [2] => require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/ek9/single.php'), get_footer, locate_template, load_template, require_once('/themes/ek9/footer.php'), wp_cumulus_insert, wp_cumulus_createflashcode, wp_tag_cloud, get_terms ) )
Гуглил, ничего толкового не нашел ((( Help !
Форум: Проблемы и решения
Тема: Непонятный код в хедере !!!Dimas_Odessa, понял. Спасибо. Так и сделаю.
Эххх, все-таки не хватает мне еще знаний. Чувствую в моем шаблоне еще куча ненужных функций, которые в детальнейшем дадут о себе знать (((
Форум: Проблемы и решения
Тема: Непонятный код в хедере !!!С ИЕ разобрался. Спасибо большое. Если не сложно, подскажите пожалуйста, а каким методом можно проверить, нужна мне эта функция или нет ? Отталкиваюсь от того, что если прописано <body> — 24 запроса в базу с главной, если <body <?php body_class(); ?>> — 26.
Форум: Проблемы и решения
Тема: Непонятный код в хедере !!!wikicms, вот я и сам не знаю, нужны они или нет ((( Сократил до простого <body>, бегло пробежался по сайту, ничего не заметил.
У меня в коде присутствует код:
<!--[if IE 6]> <style type="text/css"> #search, #rounded { behavior: url(/wp-content/themes/ek9/js/iepngfix.htc); } </style> <![endif]-->
Вот я и думаю, не к нему ли он относиться ???
Форум: Проблемы и решения
Тема: Непонятный код в хедере !!!Если я правильно понимаю, то функция body_class() должна быть в файле functions.php, но там ее не нашел. Следовательно проверка работает в холостую ???
А вот если ее нет, то что он выводит ??? Оо
чтобы было понятнее — мой донор
Заранее благодарю за помощь.
P.S. По исходному коду, body никакой класс не присвоен …