• ДОБРО ПОЖАЛОВАТЬ В КЛУБ ПО WORDPRESS

    Мы активно растущий клуб по WordPress и нам нужна помощь каждого человека, в том числе и Ваша! Не стесняйтесь и станьте частью большого сообщества.
    Мы делимся новостями, отытом и полезными советами! Пройдите простую регистрацию, чтобы пользоваться всеми возможностями нашего клуба.

    Присоединяйтесь к нам, вам обязательно понравится - Присоединится

Проблема с миниатюрами в шаблоне perkins

Dmitriy Koval

НОВИЧОК
Здравствуйте, уважаемые WP-знающие!
Зарегистрировал сайт. Всё устраивает, все настроил. По шаблону Perkins зарисовал и логотипы, которые использую во всех соц сетях, поэтому менять шаблон не хотелось бы...

В чём проблема?


Тизеры(или же анонсы статей на главной странице) выглядит блоками, без кнопки далее
WEDLANDds.png

В статью можно попасть лишь кликнув на заголовок, а в мобильной версии так вообще не кликабельно🙁 В мобильной версии можно попасть на страницу лишь пролистав вниз до свежих записей(из виджета)

В чём вопрос?

  1. Можно ли вернуть стандартную кнопку(читать далее(more))? Искал в коде не разобрался.
  2. Можно ли отключить вообще мобильную версию? удалял в css - помогло частично( но ссылки не кликаются)

    Заранее всем спасибо!
 
Последнее редактирование модератором:
Не надо лишние ссылки размещать, тем более в таком количестве.

По сути темы:
1. Что бы добавить "Читать далее" в нужном месте вставьте:
Код:
<a href="<?php the_permalink() ?>" title="<?php the_title(); ?>" rel="nofollow">Читать далее</a>
2. К сайтам у которых нет мобильных версии поисковики плохо относятся.
3. Я бы вам ещё советовал на миниатюры(это не тизеры, называйте вещи своими именами) поставьте ссылки на статью.
 
Не надо лишние ссылки размещать, тем более в таком количестве.

По сути темы:
1. Что бы добавить "Читать далее" в нужном месте вставьте:
Код:
<a href="<?php the_permalink() ?>" title="<?php the_title(); ?>" rel="nofollow">Читать далее</a>
2. К сайтам у которых нет мобильных версии поисковики плохо относятся.
3. Я бы вам ещё советовал на миниатюры(это не тизеры, называйте вещи своими именами) поставьте ссылки на статью.
Спасибо, за ответ! Понимаю, но вот именно на картинки я и не могу поставить ссылки...
functions.php тут все не как обычно, а пхп я понимаю смутно...
PHP:
<?php

// theme setup
if (!function_exists('perkins_setup')):
    function perkins_setup() {   
        register_nav_menus(array(
            'primary' => __('Primary Menu', 'perkins'),           
            'secondary' => __('Secondary Menu', 'perkins'),
            'footer' => __('Footer Menu', 'perkins'),   
        ));
        add_theme_support('post-thumbnails');
        add_theme_support('automatic-feed-links');
        add_theme_support('html5', array('search-form'));
        $custom_bg = array(
            'default-color' => '014d5b',
            'default-repeat' => 'no-repeat',
            'default-position-x' => 'center',
            'default-attachment' => 'fixed',
            'default-image' => get_template_directory_uri() . '/assets/img/bg.jpg'
        );
        add_theme_support('custom-background', $custom_bg);           
        add_image_size('featured', 768);       
        add_image_size('teaser-lg', 730, 290, true);   
        add_image_size('teaser-md', 350, 230, true);           
        add_editor_style(get_template_directory_uri() . '/assets/css/editor-style.css');       
        global $content_width; 
        if (!isset($content_width)) {$content_width = 750;}               
    }
endif;
add_action('after_setup_theme', 'perkins_setup');

// load css
function perkins_css() {   
    wp_enqueue_style('perkins_teko', '//fonts.googleapis.com/css?family=Teko:300');
    wp_enqueue_style('perkins_noto_sans', '//fonts.googleapis.com/css?family=Noto+Sans:400,700,400italic,700italic');
    wp_enqueue_style('perkins_fontawesome', get_template_directory_uri() . '/assets/font-awesome/css/font-awesome.min.css ');
    wp_enqueue_style('perkins_bootstrap_css', get_template_directory_uri() . '/assets/css/bootstrap.min.css');   
    wp_enqueue_style('perkins_style', get_stylesheet_uri());
}
add_action('wp_enqueue_scripts', 'perkins_css');

// load javascript
function perkins_javascript() {   
    wp_enqueue_script('perkins_script', get_template_directory_uri() . '/assets/js/perkins.js', array('jquery'), '1.0', true);   
    if (is_singular() && comments_open()) {wp_enqueue_script('comment-reply');}
}
add_action('wp_enqueue_scripts', 'perkins_javascript');

// html5 shiv
function perkins_html5_shiv() {
    echo '<!--[if lt IE 9]>';
    echo '<script src="'. get_template_directory_uri() .'/assets/js/html5shiv.js"></script>';
    echo '<![endif]-->';
}
add_action('wp_head', 'perkins_html5_shiv');

// page titles
function perkins_title($title, $sep) {
    global $paged, $page;
    if (is_feed()) { return $title;    }
    $title .= get_bloginfo('name');   
    $site_description = get_bloginfo('description', 'display');
    if ($site_description && (is_home() || is_front_page())) { $title = "$title $sep $site_description"; }   
    if ($paged >= 2 || $page >= 2) { $title = "$title $sep " . sprintf( __('Page %s', 'perkins'), max($paged, $page)); }
    return $title;
}
add_filter('wp_title', 'perkins_title', 10, 2);

// pagination
if (!function_exists('perkins_pagination')):
    function perkins_pagination() {
        global $wp_query;
        $big = 999999999;   
        echo '<div class="pager">';   
        echo paginate_links( array(
            'base' => str_replace($big, '%#%', esc_url(get_pagenum_link($big))),
            'format' => '?paged=%#%',
            'current' => max(1, get_query_var('paged')),
            'total' => $wp_query->max_num_pages,
            'prev_next' => False,
        ));
        echo '</div>';
    }
endif;

// widgets
function perkins_widgets_init() {
    register_sidebar(array(
        'name' => __('Primary Sidebar', 'perkins'),
        'id' => 'primary-sidebar',
        'description' => __('Widgets in this area will appear in the right sidebar on all posts and pages.', 'perkins'),
        'before_widget' => '<aside id="%1$s" class="widget %2$s">',
        'after_widget' => "</aside>",
        'before_title' => '<h4 class="widget-title">',
        'after_title' => '</h4>'
    ));   
    register_sidebar(array(
        'name' => __('Footer - Left', 'perkins'),
        'id' => 'footer-left',
        'description' => __('Widgets in this area will appear in the left column of the footer', 'perkins'),
        'before_widget' => '<aside id="%1$s" class="widget %2$s">',
        'after_widget' => "</aside>",
        'before_title' => '<h4 class="widget-title">',
        'after_title' => '</h4>'
    ));   
    register_sidebar(array(
        'name' => __('Footer - Middle', 'perkins'),
        'id' => 'footer-middle',
        'description' => __('Widgets in this area will appear in the middle column of the footer', 'perkins'),
        'before_widget' => '<aside id="%1$s" class="widget %2$s">',
        'after_widget' => "</aside>",
        'before_title' => '<h4 class="widget-title">',
        'after_title' => '</h4>'
    ));   
    register_sidebar(array(
        'name' => __('Footer - Right', 'perkins'),
        'id' => 'footer-right',
        'description' => __('Widgets in this area will appear in the right column of the footer', 'perkins'),
        'before_widget' => '<aside id="%1$s" class="widget %2$s">',
        'after_widget' => "</aside>",
        'before_title' => '<h4 class="widget-title">',
        'after_title' => '</h4>'
    ));   
}
add_action('widgets_init', 'perkins_widgets_init');

// custom excerpts
function perkins_excerpt_length($length) {
    return 30;
}
add_filter('excerpt_length', 'perkins_excerpt_length', 999);
function perkins_excerpt_more($more) {
    return '&period;&period;&period;';
}
add_filter('excerpt_more', 'perkins_excerpt_more');

// theme customizer
function perkins_customize_register($wp_customize) {
    // logo
    $wp_customize->add_section('perkins_logo_section', array(
        'title' => __('Logo', 'perkins'),
        'priority' => 35,
        'type' => 'option'       
    ));
    $wp_customize->add_setting('perkins_logo_setting', array(
        'default' => '',
        'sanitize_callback' => 'esc_url_raw'
    ));
    $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'logo', array(       
        'section' => 'perkins_logo_section',
        'settings' => 'perkins_logo_setting'
    )));
    // colors   
    $wp_customize->add_setting('perkins_links_setting', array(   
        'default' => '#2a8ea5',   
        'sanitize_callback' => 'sanitize_hex_color'
    ));   
    $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'links', array(
        'label' => __('Links', 'perkins'),
        'section' => 'colors',
        'settings' => 'perkins_links_setting'
    )));
    $wp_customize->add_setting('perkins_site_title_setting', array(   
        'default' => '#fff',   
        'sanitize_callback' => 'sanitize_hex_color'
    ));   
    $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'site_title', array(
        'label' => __('Site Title &amp; Tagline', 'perkins'),
        'section' => 'colors',
        'settings' => 'perkins_site_title_setting'
    )));
    // social links
    $wp_customize->add_section('perkins_social_section', array(
        'title' => __('Social Links', 'perkins'),
        'priority' => 65               
    ));
    $wp_customize->add_setting('perkins_twitter_setting', array(       
        'sanitize_callback' => 'esc_url_raw'
    ));
    $wp_customize->add_control('perkins_twitter', array(
        'label' => __('Twitter', 'perkins'),           
        'section' => 'perkins_social_section',
        'settings' => 'perkins_twitter_setting'
    ));
    $wp_customize->add_setting('perkins_facebook_setting', array(       
        'sanitize_callback' => 'esc_url_raw'
    ));
    $wp_customize->add_control('perkins_facebook', array(
        'label' => __('Facebook', 'perkins'),           
        'section' => 'perkins_social_section',
        'settings' => 'perkins_facebook_setting'
    ));   
    $wp_customize->add_setting('perkins_gplus_setting', array(       
        'sanitize_callback' => 'esc_url_raw'
    ));
    $wp_customize->add_control('perkins_gplus', array(
        'label' => __('Google+', 'perkins'),           
        'section' => 'perkins_social_section',
        'settings' => 'perkins_gplus_setting'
    ));   
    $wp_customize->add_setting('perkins_youtube_setting', array(       
        'sanitize_callback' => 'esc_url_raw'
    ));
    $wp_customize->add_control('perkins_youtube', array(
        'label' => __('YouTube', 'perkins'),           
        'section' => 'perkins_social_section',
        'settings' => 'perkins_youtube_setting'
    ));   
    $wp_customize->add_setting('perkins_instagram_setting', array(       
        'sanitize_callback' => 'esc_url_raw'
    ));
    $wp_customize->add_control('perkins_instagram', array(
        'label' => __('Instagram', 'perkins'),           
        'section' => 'perkins_social_section',
        'settings' => 'perkins_instagram_setting'
    ));
    $wp_customize->add_setting('perkins_pinterest_setting', array(       
        'sanitize_callback' => 'esc_url_raw'
    ));
    $wp_customize->add_control('perkins_pinterest', array(
        'label' => __('Pinterest', 'perkins'),           
        'section' => 'perkins_social_section',
        'settings' => 'perkins_pinterest_setting'
    ));       
    $wp_customize->add_setting('perkins_linkedin_setting', array(       
        'sanitize_callback' => 'esc_url_raw'
    ));
    $wp_customize->add_control('perkins_linkedin', array(
        'label' => __('Одноклассники', 'perkins'),           
        'section' => 'perkins_social_section',
        'settings' => 'perkins_linkedin_setting'
    ));   
    $wp_customize->add_setting('perkins_rss_setting', array(       
        'sanitize_callback' => 'esc_url_raw'
    ));
    $wp_customize->add_control('perkins_rss', array(
        'label' => __('RSS', 'perkins'),           
        'section' => 'perkins_social_section',
        'settings' => 'perkins_rss_setting'
    ));   
}
add_action('customize_register', 'perkins_customize_register');

// custom css
function perkins_custom_css() {
    wp_enqueue_style('custom-style', get_template_directory_uri() . '/assets/css/custom.css');
    $links = esc_attr(get_theme_mod('perkins_links_setting'));
    $site_title = esc_attr(get_theme_mod('perkins_site_title_setting'));   
    $custom_css = "
                a, a:hover, #primary-menu li a, .teaser .teaser-title a:hover, .teaser-top .teaser-title a:hover, .sticky .teaser-title a:hover {color:{$links};}
                #primary-menu .sub-menu {background-color:{$links};}
                .sticky .teaser-title, .teaser-title {border-color:{$links};}
                #site-title, #site-desc {color:{$site_title};}
                ";
    wp_add_inline_style('custom-style', $custom_css);
}
add_action('wp_enqueue_scripts', 'perkins_custom_css');

// comments
if (!function_exists('perkins_comment')) :
    function perkins_comment($comment, $args, $depth) {
        $GLOBALS['comment'] = $comment;
        ?>   
        <li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>">    
        <div id="comment-<?php comment_ID(); ?>" class="comment">
            <div class="comment-header">   
                <div class="comment-author">
                    <?php echo get_avatar($comment, 32); ?>
                    <p class="comment-author-name"><span><?php comment_author_link(); ?></span><br /><?php echo get_comment_date() . ' - ' . get_comment_time() ?></p>
                </div>               
            </div>
            <div class="comment-body">           
                <?php comment_text(); ?>
                <?php if ('0' == $comment->comment_approved) : ?>               
                    <p class="comment-awaiting-moderation"><?php _e('Comment is awaiting moderation!', 'perkins'); ?></p>                   
                <?php endif; ?>               
            </div>           
        </div>
    <?php
    }
endif;

?>
 
[CSS]/*
Theme Name: Perkins
Description: Perkins is a responsive theme suitable for both blogs or business websites. Perkins allows you to setup a homepage with a magazine style layout and upload a custom background image to match your site content and branding. Perkins also allows you to upload a logo and customize the colors.
Author: Michael Burrows
Author URI: http://www.wpmultiverse.com/
Theme URI: http://www.wpmultiverse.com/themes/perkins/
Tags: blue, white, light, two-columns, right-sidebar, responsive-layout, custom-background, custom-colors, custom-menu, editor-style, featured-images, sticky-post, threaded-comments
Version: 1.0.2
License: GNU General Public License v3.0
License URI: http://www.gnu.org/licenses/gpl-3.0.html
Perkins WordPress Theme, Copyright 2014 wpmultiverse.com
Perkins WordPress Theme is distributed under the terms of the GNU GPL
Text Domain: perkins
*/

body {font-family:'Noto Sans',sans-serif; color:#555; line-height:1.6em;}
body.custom-background {background-size:cover;}
a {color:#2a8ea5;}
a:hover {text-decoration:none; opacity:0.7; color:#2a8ea5;}
img {max-width:100%!important; height:auto; display:block;}
#main-holder {background-color:#fff; padding:0;}

/* ----- secondary menu & social icons ----- */
#secondary-menu {background-color:#333; padding:5px 0;}
#secondary-menu ul {padding:0; margin:0;}
#secondary-menu li {display:inline; margin-right:10px; font-size:12px;}
#secondary-menu a {color:#aaa;}
#secondary-menu a:hover, #social-icons a:hover {color:#fff;}
#social-icons a {float:right; font-size:14px; margin-left:10px;}

/* ----- site title & description ----- */
#logo-holder {text-align:center; padding:30px 0 45px 0;}
#logo {margin-bottom:25px; display:inline-block;}
#site-title {font-family:'Teko',sans-serif; font-size:80px; line-height:80px; color:#fff; text-transform:uppercase; margin-bottom:15px;}
#site-title:hover {opacity:0.6;}
#site-desc {line-height:0.5; text-align:center; font-size:22px; font-family:'Teko',sans-serif; margin:0; color:#f0f0f0; opacity:0.6;}
#site-desc span {display:inline-block; position:relative;}
#site-desc span:before, #site-desc span:after {content:""; position:absolute; height:5px; border-bottom:1px solid #aaa; border-top:1px solid #aaa; top:2px; width:100px;}
#site-desc span:before {right:100%; margin-right:15px;}
#site-desc span:after {left:100%; margin-left:15px;}

/* ----- primary menu ----- */
#primary-menu {background:transparent url('assets/img/overlay.png'); margin-bottom:30px; width:100%; clear:both; float:left; position:relative;}
#primary-menu ul {position:relative; float:right; right:50%; margin:0; padding:0; list-style:none;}
#primary-menu li {position:relative; float:left; left:50%; padding:16px 26px; font-size:15px; display:block;}
#primary-menu li a {font-weight:bold;}
#primary-menu li a:hover {opacity:0.8;}
#primary-menu .sub-menu {display:none; background:#2a8ea5 url('assets/img/overlay.png'); float:none; position:absolute; left:-1px; z-index:9999; top:53px; padding:3px 26px 8px 26px; right:auto;}
#primary-menu .sub-menu li {float:none; border:0; position:static; right:0; white-space:nowrap; font-size:13px; padding:0;}
#primary-menu .sub-menu li a {font-weight:normal; color:#fff; text-transform:none; padding:4px 0; width:100%; display:block;}
#primary-menu .sub-menu li a:hover {opacity:0.6;}
#mobile-menu {display:none;}

/* ----- footer ----- */
footer {margin-top:60px;}
#footer-widgets {width:100%; background:transparent url('assets/img/bg-footer.png'); padding-top:20px;}
#footer-widgets .widget-title {background-image:none; border:0; padding:0;}
#footer-meta {width:100%; background:#eee url('assets/img/overlay.png'); font-size:13px;}
#footer-meta a {color:#555;}
#footer-meta a:hover {color:#333;}
#footer-meta nav {float:right;}
#footer-meta nav ul {padding-left:0;}
#footer-meta nav li {float:left; margin-left:20px; list-style:none;}

/* ----- widgets ----- */
.widget {margin-bottom:30px;}
.widget ul, .widget ol {padding:0;}
.widget li {margin-left:16px;}
.widget select {max-width:100%;}
.widget-title {background:transparent url('assets/img/overlay.png'); padding:8px 0 8px 12px; margin-top:0; font-size:14px; border-left:3px solid #eee;}
.widget_search input[type=search] {width:65%;}
.widget_tag_cloud a {font-size:12px!important; background-color:#444; color:#fff; padding:4px 8px; margin:0 4px 6px 0; display:inline-block;}
.widget_tag_cloud a:hover {background-color:#aaa; color:#444;}
.widget_calendar table {width:100%;}

/* ----- sticky posts ----- */
.sticky {padding:30px 30px 0 30px; background-color:#f2f2f2; border-bottom:3px solid #eee;}
.sticky .row {margin-bottom:30px;}
.sticky .teaser-title {margin-top:0; font-size:36px; color:#000; line-height:1.1em; border-left:5px solid #2a8ea5; padding-left:15px;}
.sticky .teaser-title a {color:#000;}

/* ----- post teasers ----- */
#teaser-holder {padding:30px;}
#teaser-top-holder {border-bottom:1px dotted #ddd; float:left; padding-bottom:15px;}
#teaser-top-holder .top-1 {padding-left:0;}
#teaser-top-holder .top-2 {padding-right:0;}
.teaser-top .teaser-date {background-color:#f2f2f2; color:#aaa; text-transform:uppercase; font-size:11px; margin:0; padding:3px 10px;}
.teaser-top .teaser-title {padding-left:10px; font-size:16px;}
.teaser-top .teaser-title a {color:#000;}
.teaser {float:left; width:100%; padding:20px 20px 20px 0; border-bottom:1px dotted #ddd;}
.teaser img {margin-bottom:12px;}
.teaser p {margin:0}
.teaser .teaser-date {font-size:11px; line-height:11px; text-transform:uppercase; color:#aaa; margin:0 0 10px 0;}
.teaser .teaser-title {font-size:15px; padding-left:10px; margin:0 0 10px 0;}
.teaser .teaser-title a {color:#000;}
.teaser .teaser-title a:hover, .teaser-top .teaser-title a:hover, .sticky .teaser-title a:hover {color:#2a8ea5;}
.teaser-title {border-left:3px solid #2a8ea5; }

/* ----- posts & pages ----- */
article {line-height:1.75em;}
article h1, article h2, article h3, article h4, article h5, article h6, #archive-title {margin:0 0 25px 0; color:#333; letter-spacing:-0.02em;}
article h1 {font-size:30px;}
article h2 {font-size:26px;}
article h3 {font-size:22px;}
article h4 {font-size:20px;}
article h5 {font-size:18px;}
article h6 {font-size:16px;}
article p, article dl { margin-bottom:20px;}
article blockquote {font-size:20px; font-style:italic; line-height:1.75em;}
article blockquote cite {width:100%; display:block; color:#333; font-size:16px; font-style:normal; font-weight:bold;}
article dt {font-weight:bold;}
article dd {margin:0 0 10px 0;}
article table {width:100%; margin-bottom:20px;}
article table td, article table th {padding:5px; border:1px solid #ddd;}
article table th {background-color:#f9f9f9;}
article .attachment-featured {margin-bottom:30px;}
#content-holder {padding:30px; background-color:#fff;}
#post-title {line-height:1.2em; margin:0;}
#post-meta {color:#aaa; border-bottom:2px solid #f2f2f2; padding-bottom:10px;}
#post-meta span {margin-right:10px;}
#post-meta i {margin-right:4px;}
#post-tags {margin-top:30px;}
#post-tags a {margin-right:8px; font-size:13px; color:#333;}
#post-footer {background-color:#f9f9f9; border-top:2px solid #f2f2f2; padding:15px 20px 20px 20px; margin:45px 0 30px 0;}
#post-footer p {margin:0 5px; color:#999; font-size:12px;}
#post-footer .fa {color:#bbb; font-size:14px;}
#post-footer .fa-arrow-circle-left {margin-right:4px;}
#post-footer .fa-arrow-circle-right {margin-left:4px;}
#post-footer #post-nav-prev {float:left; width:50%;}
#post-footer #post-nav-next {float:right; width:50%; text-align:right;}
.alignleft {float:left; margin:0 20px 20px 0;}
.alignright {float:right; margin:0 0 20px 20px;}
.aligncenter {margin:0 auto 20px auto;}
.wp-caption-text, .gallery-caption {max-width:100%; font-size:15px; font-style:italic; margin-top:5px; color:#777;}
.pager {width:100%; float:left; margin-top:50px; text-align:center;}
.pager .current {font-weight:bold; color:#333;}
.pager .page-numbers, #post-pager a {background-color:#f2f2f2; display:inline-block; padding:3px 11px;}
.pager a.page-numbers:hover, #post-pager a:hover {background-color:#333; color:#fff;}

/* ----- comments ----- */
#comments-title {font-size:18px;}
.comment-list {padding:0;}
.comment-list li {list-style:none;}
.comment-list div.comment {margin-bottom:15px; border-bottom:2px solid #f2f2f2;}
.comment-list .avatar {float:left; margin-right:10px;}
.comment-list .comment-header {font-size:13px; margin-bottom:15px;}
.comment-list .comment-author-name {margin:0; line-height:18px;}
.comment-list .comment-author a {color:#333;}
.comment-list .bypostauthor .comment-author img {border:2px solid #ccc;}
.comment-list .bypostauthor .comment-author-name span {font-weight:bold; font-style:italic;}
.comment-list .comment-body {margin-bottom:15px;}
#commentform label {width:100px; display:block; margin-bottom:10px;}
#commentform .comment-form-comment label {display:none;}
.form-allowed-tags {display:none;}

/* ----- forms ----- */
input[type=text], input[type=password], input[type=email], input[type=search], textarea {border:1px solid #eee; background-color:#f9f9f9; margin-right:5px; padding:12px; width:85%; font-size:14px; color:#222; margin-bottom:10px; -webkit-border-radius:3px; -moz-border-radius:3px; border-radius:3px;}
input[type=submit], input[type=reset] {background-color:#444; border:0; color:#fff; padding:10px 14px; text-align:center; font-size:14px; -webkit-border-radius:2px; -moz-border-radius:2px; border-radius:2px;}
input[type=submit]:hover, input[type=reset]:hover {background-color:#aaa; color:#444;}
input[type=password] {width:50%;}
.screen-reader-text {display:none;}

/* ----- mobile devices ----- */
@media (max-width:768px) {

#site-desc {font-size:14px; line-height: 15px;}
#site-desc span:before, #site-desc span:after {display:none;}
px;}
footer {margin-top:0;}

}
@media (max-width:460px) {

#site-desc {font-size:14px; line-height: 15px;}
#site-desc span:before, #site-desc span:after {display:none;}
#teaser-top-holder .col-xs-6 {width:100%;}
#teaser-top-holder .teaser-top img {width:100%;}
#teaser-top-holder .top-1 {padding-right:0;}
#teaser-top-holder .top-2 {padding-left:0;}
.teaser .col-xs-3, .teaser .col-xs-9 {width:100%;}
}[/CSS]
 
Был бы очень благодарен, если покажете как сделать ссылку из миниатюр(думаю мобильная версия тож будет кликабельна)
P.S. Тизером назвал потому, что в коде этот момент называется teaser 🙂
 
Вы не там ищите. Открываете файл content.php и ищете:
PHP:
<?php the_post_thumbnail('teaser-md'); ?>
В коде встретится в 2 местах. Это и есть ваши миниатюры и в обоих случаях ставите на них ссылки, что бы получилось так:
PHP:
<a href="<?php the_permalink() ?>" title="<?php the_title(); ?>" rel="nofollow" ><?php the_post_thumbnail('teaser-md'); ?></a>
По этому принципу проводите тоже самое с статьями для которых не назначена миниатюра и стандартная картинка ищите чуть ниже в коде:
PHP:
<?php echo get_stylesheet_directory_uri(); ?>/assets/img/placeholder.gif" />
И так же ставите на неё ссылку. Вот и всё.
 
Последнее редактирование:
Вы не там ищите. Открываете файл content.php и ищете:
PHP:
<?php the_post_thumbnail('teaser-md'); ?>
В коде встретится в 2 местах. Это и есть ваши миниатюры и в обоих случаях ставите на них ссылки, что бы получилось так:
PHP:
<a href="<?php the_permalink() ?>" title="<?php the_title(); ?>" rel="nofollow" ><?php the_post_thumbnail('teaser-md'); ?></a>
По этому принципу проводите тоже самое с статьями для которых не назначена миниатюра и стандартная картинка ищите чуть ниже в коде:
PHP:
<?php echo get_stylesheet_directory_uri(); ?>/assets/img/placeholder.gif" />
И так же ставите на неё ссылку. Вот и всё.
Спасибо огромное!

dsd.jpg


верхние картинки теперь кликаются, а вот с нижними пока не понятно. Проблема теперь не в этом..
в мобильной версии все также не кликается, или если сократить окно браузера вдвое картинки и ссылки не кликаются...
 
Content.php(измененный)

PHP:
<?php if (is_single()) : ?>
    <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
        <?php the_post_thumbnail('featured'); ?>           
        <div id="post-content">           
            <?php the_title('<h1 id="post-title">', '</h1>'); ?>
            <p id="post-meta">
                <span><i class="fa fa-calendar"></i> <?php the_time(get_option('date_format')); ?></span>
                <span><i class="fa fa-user"></i> <?php the_author(); ?></span>
                <span><i class="fa fa-comments"></i> <?php comments_number('0 Комментариев', '1 Комментарий', 'Комментариев: % '); ?></span>
            </p>            
            <?php the_content() ?>           
            <?php wp_link_pages('before=<div id="post-pager">&after=</div>'); ?>       
            <?php
            $perkins_post_tags = get_the_tags();
            if ($perkins_post_tags) :                   
                echo '<div id="post-tags">';
                foreach($perkins_post_tags as $perkins_tag) {
                    echo '<a href="' . get_tag_link($perkins_tag->term_id ) . '">#' . $perkins_tag->name.'</a>';
                  }
                  echo '</div>';                         
            endif;
            ?>           
        </div>       

        <div id="post-footer" class="clearfix">               
            <?php previous_post_link('<div id="post-nav-prev"><p><i class="fa fa-arrow-circle-left"></i> Предыдущая тема</span></p>%link</div>'); ?>    
            <?php next_post_link('<div id="post-nav-next"><p> Следующая тема <i class="fa fa-arrow-circle-right"></i></p>%link</div>'); ?>           
        </div>   
    </article>   
<?php else : ?>
    <?php global $perkins_count; ?>
    <?php if ($perkins_count == 1): ?>
        <div id="teaser-top-holder">
    <?php endif; ?>       
    <?php if ($perkins_count == 1 || $perkins_count == 2): ?>
        <div class="col-xs-6 top-<?php echo $perkins_count; ?>">
            <div <?php post_class(); ?>>
                <div class="teaser-top">
                    <?php if (has_post_thumbnail()) : ?>
                        <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>" rel="nofollow" >
                        <?php the_post_thumbnail('teaser-md'); ?>
                        </a>
                    <?php else : ?>
                        <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>" rel="nofollow" >
                        <img src="<?php echo get_stylesheet_directory_uri(); ?>/assets/img/placeholder.gif" /></a>
                    <?php endif; ?>       
                    <p class="teaser-date"><?php the_time(get_option('date_format')); ?></p>   
                    <?php the_title('<h3 class="teaser-title"><a href="' . esc_url( get_permalink()) . '">', '</a></h3>'); ?>
                    <div class="teaser-text">
                        <?php the_excerpt(); ?>   
                    </div>           
                </div>
            </div>
        </div>
    <?php else : ?>           
        <div class="teaser col-md-12">
            <div <?php post_class(); ?>>
            <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>" rel="nofollow" ><?php if (has_post_thumbnail()) : ?></a>
                <div class="col-xs-4"><?php the_post_thumbnail('teaser-md'); ?></div>
                <div class="col-xs-8">                   
            <?php else : ?>
                <div class="col-sm-12">
                            <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>" rel="nofollow" >
                        <img src="<?php echo get_stylesheet_directory_uri(); ?>/assets/img/placeholder.gif" /></a>
                            <?php endif; ?>                           
                <p class="teaser-date"><?php the_time(get_option('date_format')); ?></p>   
                <?php the_title('<h3 class="teaser-title"><a href="' . esc_url( get_permalink()) . '">', '</a></h3>'); ?>
                <?php the_excerpt(); ?>   
                </div>               
            </div>       
        </div>
    <?php endif; ?>
    <?php if ($perkins_count == 2): ?>
    </div>
<?php endif; ?>
<?php endif; ?>
 
1. Если вы делаете всё как я описал выше

В коде встретится в 2 местах. Это и есть ваши миниатюры и в обоих случаях ставите на них ссылки, что бы получилось так:
То тогда и нижние картинки будут кликабельные.

2. А по мобильному варианту уберите виджет поиска и все будет работать. Почему-то в этом шаблоне поиск перекрывает весь остальной блок сайта.
 
1. Если вы делаете всё как я описал выше


То тогда и нижние картинки будут кликабельные.

2. А по мобильному варианту уберите виджет поиска и все будет работать. Почему-то в этом шаблоне поиск перекрывает весь остальной блок сайта.
при удалении поиска, в мобильной версии ссылки и миниатюры также не кликаются, а еще миниатюры покрылись сверху слоем Overlay.png
 
Untitled-1.jpg

только посмотрите куда сдвигаются и уменьшаются ссылки в мобильной css версии
 
параметры колон и записей указываются в bootstrap.min.css в котором невозможно работать
 
Что-то вы намудрили у себя. Вот тестовый сайт с вашей темой. Внес описанные выше действия и всё работает.
 
Интересно кому я пишу тут 😱 Зачем вы спрашиваете и не делаете, что вам советуют.

1. Нижние картинки у вас кликабельные, куда вы смотрите не знаю.
2. Не убрали поиск и пишете, что ничего не работает.
 
Что-то вы намудрили у себя. Вот тестовый сайт с вашей темой. Внес описанные выше действия и всё работает.

Нижние посты я исправил после того, как написал. А виджет поиска вернул убедившись, что не помогло.
 
Значит вы что-то перемудрили, как писал выше на тестовом всё работает. Ищите причины дальше.
как видите в мобильной версии заголовок сливается с белым фоном, вот это я и исправял и судя по всему - криво. Попытаюсь разобраться. Пожалуйста, не закрывайте тему
 
Вы можете скинуть сюда content.php? Это же единственный файл который изменялся
 
ну я уже честно не знаю в чем дело. я создал новый шаблон и поменял только ваш content.php и удалил поиск. я проверял на Denwerе и на хостинге, пустой wordpress и свой все также. Wedland.uz
 
[DL]http://wedland.uz/wp-content/uploads/perkins.rar[/DL] на всякий случай
 
Последнее редактирование модератором:
Проблема получается в сайдбаре. А точнее подключение его в общий шаблон для мобильников, получается он свершу основного контента. Если убрать все виджеты, то будет работать.
 
Проблема получается в сайдбаре. А точнее подключение его в общий шаблон для мобильников, получается он свершу основного контента. Если убрать все виджеты, то будет работать.
убивать сайдбар - не дело. Жаль, что разработчики выпустили кривой шаблон
 
убивать сайдбар - не дело. Жаль, что разработчики выпустили кривой шаблон
Много разработчиков с кривыми руками. А сайдбар убирать конечно же не надо, это я вам дал направление в котором двигаться надо и где ковырять, что бы всё заработало.
 
Много разработчиков с кривыми руками. А сайдбар убирать конечно же не надо, это я вам дал направление в котором двигаться надо и где ковырять, что бы всё заработало.
Отличный у вас ресурс, хорошо когда автор оперативно отвечает.
А вы работали с фреймворком bootstrap?
ответ всех мобильных версии там
 
Отличный у вас ресурс, хорошо когда автор оперативно отвечает.
Спасибо. По возможности стараемся.

А вы работали с фреймворком bootstrap?
Так немного, в основном только правки вносил на очередном кривом шаблоне.🙂
 
Назад
Сверху