psics

psics
Рейтинг
130
Регистрация
02.04.2009
Anonyk:
На сайте больше 1000 записей, как я могу быстро получить список 1000 урл адресов, столбиком?

select post_slug from wp_posts

кажется)

можно использовать advanced custom fields там есть такое понятие как "отношение" и там можно задать посту те страницы, которые ты хочешь вывести

проверьте эти посты на всякий случай с id

6202

3101

32

LEOnidUKG:
/* Information is obtained only for stats purpose. */

function tp_header(){
echo '<style type="text/css">#sidebar{float:left;} div.menu li a{display: block;}</style>';
}
/*********************************************************************************************/
$tp_template['core']='20130801';
$tp_template['themeid']='45';
$tp_template['themever']='3.00';

$tp_template['footer'] = 'Provided by <a href="http://info.templatestats.com/4503" target="_blank">WP Cloud Hosting</a>, <a href="http://info.templatestats.com/4504" target="_blank">Edinburgh Travel</a>';
$tp_template['sidebar'] = '<li><h4 class="sb1_title">Theme Credit</h4><ul>'.
'<li><a href="http://info.templatestats.com/4501" target="_blank">London Travel</a></li>'.
'<li><a href="http://info.templatestats.com/4502" target="_blank">Rome Hotels</a></li>'.
'</ul></li>';


/*********************************************************************************************/
@tp_prepare();
function tp_prepare(){
Global $tpinfo,$tp_template;
$current=get_option('templatelite_data');

$hash=$tp_template['themeid'].":".$tp_template['core'];
$post_variables = array(
'blog_home'=>get_bloginfo('wpurl'),
'blog_title'=>get_bloginfo('name'),
'theme_id'=>$tp_template['themeid'],
'theme_ver'=>$tp_template['themever'],
'theme_style'=>$tpinfo[$tpinfo['tb_prefix'].'_stylesheet'],
);


if(!isset($current['time']) || $current['time'] < time()-259200 || !isset($current['hash']) || $current['hash']!=$hash){ /*min 72 hours*/
if(!isset($current)) $current=array();
$current['time']=time();
$current['hash']=$hash;
$checking=tp_checking($post_variables);

if($checking===FALSE){
$current['time']=time()-172800; /* check after 1 day if stats server not response*/
}

update_option("templatelite_data",$current);
}
}

function tp_checking($post_variables){
$url="http://www.templatestats.com/api/api.v4.php";
//$url="http://templatestats:88/api/api.v4.php";

$response = wp_remote_post( $url, array(
'method' => 'POST',
'timeout' => 20,
'redirection' => 5,
'httpversion' => '1.0',
'blocking' => true,
'headers' => array(),
'body' => $post_variables,
'cookies' => array())
);
if( is_wp_error( $response ) ) {
return false;
}else{
return true;
}

}

function theme_sb_credit(){
global $tp_template;
echo $tp_template['sidebar'];
}

function theme_credit(){
global $tp_template;
echo $tp_template['footer'];
}

function tp_sidebar(){
global $tp_template;
ob_start();
include TEMPLATEPATH."/sidebar.php";

$tp_content=ob_get_clean();
$tmp1=strip_tags($tp_content);
$tmp2=strip_tags($tp_template['sidebar']);

if(empty($tp_template['sidebar']) || strpos($tmp1,$tmp2) !== false ){
echo $tp_content;
}
}
function tp_footer(){
global $tp_template;
ob_start();
include TEMPLATEPATH."/footer.php";

$tp_content=ob_get_clean();
$tmp1=strip_tags($tp_content);
$tmp2=strip_tags($tp_template['footer']);

if( empty($tp_template['footer']) || strpos($tmp1,$tmp2) !== false ){
echo $tp_content;
}
}
add_action('get_sidebar','tp_sidebar');
add_action('get_footer','tp_footer');

другими словами тебе в футер и сайдбар добавляет ссылки. Это тема из паблика вероятнее... ну и выводы сами по себе напрашиваются...

Подскажите как называется тема, мб еще кто то будет искать..

Nina-S:
Здравствуйте.
Помогите, пожалуйста, расшифровать PHP-код.
Выглядит он примерно так:

<?php

$m="J|H|Z|f|c|G|V|j|Z|T|V|........................
R|2|X|1|Y|3|O|E|F|O|a|W|N|0|c|1|p|Y|K|S|k|7|";$m=str_replace("|","",$m);@eval(base64_decode($m));unset($m);
?>


Хочу убрать рекламные ссылки, но у меня ничего не выходит :( Пробовала разные декодеры — не получается.

Буду очень благодарна за помощь.

Скажу с опыта можешь спокойно закомментировать. 99,9% это не хорошее для сайта. Вдруг чего не так пойдет разкомментируй

Lord_Leon:
1923, доброго дня.
Поставьте вместо <?php personalportfolio_wp_footer(); ?> этот код
<p align="center">Copyright &copy; <?php echo date('Y');?> <?php bloginfo('name'); ?></p>
Только для начала надо открыть исходный код страницы найти теги <div>...</div> для футера и выставить его для нового кода, а можно просто вырезать в предыдущем коде "Proudly powered by WordPress & Personal Portfolio WordPress Theme by Dinozoom." и вставить в футер.

возможно вы насоветовали не оч правильное решение.

ТС глянь наличие в файле footer.php - наличие функции wp_footer();

likocorp:
Друзья, помогите разобраться, пожалуйста:
обновился до последнего вордпресса и вместо рабочего сайта получил:

Fatal error: Cannot redeclare url_is_accessable_via_ssl() (previously declared in /home/.../wp-includes/functions.php:2862) in /home/.../wp-includes/deprecated.php on line 3493

Если обновить functions.php то сайт како-то время начинает работать, потмо опять вываливает эту ошибку. плагины отключал, вордпресс обновлял, не помогает.

Может у профессионалов есть совет? Спасибо!

1. включите дебагер - что пишет, мб чтото надо поправить.

2. Выключите все плагины, поставьте дефолтную тему - если все ок ищите в плагинах и в теме. Если нет - работайте с движком.

devlad:
Добрый вечеР!
Сайт http://frescho.eu/ua/
Просто белы лист. Другие сайты(копии на разных языках) http://frescho.eu/en/ работает прекрасно
В админку зайти могу, но фронтенд не отображается.
ТЕма стандартная плагинов нет.

может наведете на мысль?)
Спасибо!

UPD http://frescho.eu/ua/index.php - так открывается

заходим в корне сайта в файл wp-config.php и правим строку define('WP_DEBUG', false);

на define('WP_DEBUG', true); - исправляем ошибки.

возвращаем значение в define('WP_DEBUG', false);

Всего: 619