Хочу чтобы в после каждой статьи показывался определенный текст, вставлял в function.php это код:
function my_post_footer($content) {
if(is_single()) {
$content = $content."<br /><div style='font-size:10px; color:gray'>текст</div>\n";
}
return $content;
}
add_filter('the_content', 'my_post_footer');
текст выводится, но нельзя сделать ссылку, когда ставил ссылку при обновлении страницы выдавал ошибку: Parse error: syntax error, unexpected T_STRING
Может надо где-то в другом месть что-то написать в файле single.php(он, кажется отвечает за пост) такая картина:
<?php get_header(); ?>
<div class="art-content-layout">
<div class="art-content-layout-row">
<div class="art-layout-cell art-sidebar1">
<?php get_sidebar('default'); ?>
<div class="cleared"></div>
</div>
<div class="art-layout-cell art-content">
<?php get_sidebar('top'); ?>
<?php
if (have_posts()){
/* Display navigation to next/previous posts when applicable */
if (theme_get_option('theme_top_single_navigation')) {
theme_page_navigation(
array(
'next_link' => theme_get_previous_post_link('« %link'),
'prev_link' => theme_get_next_post_link('%link »')
)
);
}
while (have_posts())
{
the_post();
get_template_part('content', 'single');
comments_template();
}
/* Display navigation to next/previous posts when applicable */
if (theme_get_option('theme_bottom_single_navigation')) {
theme_page_navigation(
array(
'next_link' => theme_get_previous_post_link('« %link'),
'prev_link' => theme_get_next_post_link('%link »')
)
);
}
} else {
theme_404_content();
}
?>
<?php get_sidebar('bottom'); ?>
<div class="cleared"></div>
</div>
<div class="art-layout-cell art-sidebar2">
<?php get_sidebar('secondary'); ?>
<div class="cleared"></div>
</div>
</div>
</div>
<div class="cleared"></div>
<?php get_footer(); ?>
Помогите вывести текст со ссылкой