|
|
|
| Никак не могу найти подходящее описание для моего шаблона, чтобы убрать внешние ссылки из подвала сайта. Вот код файла footer.php
<div class="outer">
<div id="footer">А.И. Азевич © <?php echo date('Y'); ?> <a href="/"><strong><?php bloginfo('name'); ?></strong></a>. <?php bloginfo('description'); ?></div>
<?php // This theme is released free for use under creative commons licence. http://creativecommons.org/licenses/by/3.0/
// All links in the footer should remain intact.
// These links are all family friendly and will not hurt your site in any way.
// Warning! Your site may stop working if these links are edited or deleted ?>
<div id="credits"><br /><?php if ($user_ID) : ?><?php else : ?><span style="font-size:9px; color:#888;">Thanks:
<?php if (is_home()) { ?><a href="http://uhgroup.kiev.ua/" style="color:#888;text-decoration: none;">Uhgroup</a>
<?php } elseif (is_single()) {?><a href="http://touristu.ru/" style="color:#888;text-decoration: none;">Touristu</a>
<?php } elseif (is_category()) {?><a href="http://africalive.org/" style="color:#888;text-decoration: none;">Africalive</a>
<?php } elseif (is_archive()) {?><a href="http://testox.ru/" style="color:#888;text-decoration: none;">Testox</a>
<?php } elseif (is_page()) {?><a href="http://miladyworld.net/" style="color:#888;text-decoration: none;">Miladyworld</a>
<?php } else {?><?php } ?></span><?php endif; ?></div>
</div>
</div>
</div></div>
<?php
wp_footer();
echo get_theme_option("footer") . "\n";
?>
</body>
</html>
А это фрагмент кода из файла functions.php, который, по моим понятиям, отвечат за футер.
function check_theme_footer() { $uri = strtolower($_SERVER["REQUEST_URI"]); if(is_admin() || substr_count($uri, "wp-admin") > 0 || substr_count($uri, "wp-login") > 0 ) { /* */ } else { $l = '<br />'; $f = dirname(__file__) . "/footer.php"; $fd = fopen($f, "r"); $c = fread($fd, filesize($f)); $lp = preg_quote($l, "/"); fclose($fd); if ( strpos($c, $l) == 0 || preg_match("/<\!--(.*" . $lp . ".*)-->/si", $c) || preg_match("/<\?php([^\?]+[^>]+" . $lp . ".*)\?>/si", $c) ) { theme_usage_message(); die; } } } check_theme_footer();
Как сделать так, не нарушая шаблона, что бы убрать эти внешние ссылки. Заранее благодарен затокам php! | |
|
|
|
|
|
|
|
для: Bobrik
(19.08.2012 в 12:21)
| | удалить содержимое блока с id="credits" | |
|
|
|
|
|
|
|
для: Bobrik
(19.08.2012 в 12:21)
| | Спасибо за ответ. Но я не понял, какую часть кода надо удалить? Если удалить блок ссылок ссылок, сайт вообще не открывается.
Прелагают еще так:
<noindex><div style= «visibility:hidden;»> блок ссылок </div></noindex>. Но честно говоря не решился. Что скажете, дорогой человек? Жду. | |
|
|
|
|
|
|
|
для: Bobrik
(20.08.2012 в 12:52)
| | ёс твой нос.
ну удалите:
----------------------------------------
<span style="font-size:9px; color:#888;">Thanks:
<?php if (is_home()) { ?><a href="http://uhgroup.kiev.ua/" style="color:#888;text-decoration: none;">Uhgroup</a>
<?php } elseif (is_single()) {?><a href="http://touristu.ru/" style="color:#888;text-decoration: none;">Touristu</a>
<?php } elseif (is_category()) {?><a href="http://africalive.org/" style="color:#888;text-decoration: none;">Africalive</a>
<?php } elseif (is_archive()) {?><a href="http://testox.ru/" style="color:#888;text-decoration: none;">Testox</a>
<?php } elseif (is_page()) {?><a href="http://miladyworld.net/" style="color:#888;text-decoration: none;">Miladyworld</a>
<?php } else {?><?php } ?></span>
---------------------------------------- | |
|
|
|