Search
Write a publication
Pull to refresh

Доработка темы созданой Artisteer 3 — создание страницы для вывода категорий

Тем кто создавал тему для своего блога на Artisteer 3.0 и выше
наверно знакомо то, что категории и архивы выводятся одинаково и скажем так не красиво на мой взгляд.
Я решил это исправить.
всё работу мы будем производить в каталоге темы
итак приступим:

копируем файл arhive.php в файл с именем category.php
в новом файле находим строчку
get_template_part('content', get_post_format());

и меняем её
get_template_part('content-11', get_post_format());

теперь создаём файл content-11.php (в корне папки с темой) с содержимым:

<?php
    global $post;
    theme_post_wrapper(
    array(
    'id' => theme_get_post_id(),
        'before' => theme_get_metadata_icons( 'date', 'header' ),
        'title' => '<a class="cat-11" href="' . get_permalink( $post->ID ) . '" rel="bookmark" title="' .
 get_the_title() . '">' . get_the_title() . '</a>',
    'class' => "out_di ",
    'content' => theme_get_excerpt(),
        'after' => theme_get_metadata_icons( 'date', 'footer' )
        )
    );
?>

теперь подробно:
в строке
'title' => '<a class="cat-11" href="' . get_permalink( $post->ID ) . '" rel="bookmark" title="' .

мы задаём для ссылок класс “cat-11″ чтобы можно было оформить заглавие поста, добавляем в style.css следующий код

div.art-post-body div.art-post-inner div.art-postmetadataheader h2.art-postheader a.cat-11 {
    font-family: Geneva,Arial,Helvetica,sans-serif;
    font-size: 16px;
    font-weight: bold;
    text-align: left;}


строка
'class' => "out_di"

подписываем div вывода новым класом out_di
добавляем в style.css следующий код
.out_di {border: none;}
.out_di h3,.out_di h2,out_di h3 {font-size: 14px;}

сделанно для того чтобы если в посте сделаны различного уровня заголовки они перевелись к одному размеру
так же добавляем для ссылки «читать далее» в style.css код
.art-post div.art-post-body div.art-post-inner div.art-postcontent a.more-link {
    color: #0000FF;
    font-size: 14px;
    font-weight: bold;}
Tags:
Hubs:
You can’t comment this publication because its author is not yet a full member of the community. You will be able to contact the author only after he or she has been invited by someone in the community. Until then, author’s username will be hidden by an alias.