Ответы в темах

Просмотр 15 ответов — с 1 по 15 (всего 17)
  • Проблема решена на EN форуме, https://wordpress.org/support/topic/problem-with-hiding-impossible-attributes/#post-16106132

    • Ответ изменён 1 год, 5 месяцев назад пользователем rstrah.

    Записи отображаются вот так вот https://minsknews.by/sovetskij-rajon/
    https://prnt.sc/1xkqfvd

    Но как я говорил раньше он не работает дельным образом (возможно проблема в шаблоне ), просьба помочь, спасибо!

    Да

    Не помогло , тоже самое что и ‘category’ => 76967,2
    _____
    Подсказали вот такой вариант но он не до конца решает проблему

    <?php $posts = new WP_Query( [
    																							'orderby' => 'date',
    																							'posts_per_page' => 6,
    																							'tax_query' => [
    																							'relation' => 'AND',
    
    																												[
    																												'taxonomy' => 'category',
    																												'field'    => 'id',
    																												'terms'    => array( 76967, 2 ),
    																												'operator' => 'AND',
    																																				]
    																																				]
    																																				] );?>

    Сам код страницы

    <?php
    /*  ----------------------------------------------------------------------------
        the default page template
     */
    
    get_header();
    
    //set the template id, used to get the template specific settings
    $template_id = 'page';
    
    $loop_sidebar_position = td_util::get_option('tds_' . $template_id . '_sidebar_pos'); //sidebar right is default (empty)
    
    //get theme panel variable for page comments side wide
    $td_enable_or_disable_page_comments = td_util::get_option('tds_disable_comments_pages');
    
    //read the custom single post settings - this setting overids all of them
    $td_page = td_util::get_post_meta_array($post->ID, 'td_page');
    if (!empty($td_page['td_sidebar_position'])) {
        $loop_sidebar_position = $td_page['td_sidebar_position'];
    }
    
    // sidebar position used to align the breadcrumb on sidebar left + sidebar first on mobile issue
    $td_sidebar_position = '';
    if($loop_sidebar_position == 'sidebar_left') {
        $td_sidebar_position = 'td-sidebar-left';
    }
    
    /**
     * detect the page builder
     */
    $td_use_page_builder = td_global::is_page_builder_content();
    
    $custom_pages = array (481255, 631368, 643491, 646345, 647245, 652577,
    653283, 653288, 653291, 653292, 653293, 653294, 653295, 653296, 653297, 653730, 658654, 666499, 666615, 666603, 666609, 666613, 666612, 666618, 677940, 710477, 733160, 743547, 657934); //ids of custom pages. test page - 657934
    
    if ( in_array($post->ID, $custom_pages) ) {
    
        // the page is rendered using the page builder template (no sidebars)
        if (have_posts()) { ?>
            <?php while ( have_posts() ) : the_post(); ?>
    
                <div class="td-main-content-wrap td-main-page-wrap td-container-wrap">
                    <div class="<?php if (!td_util::tdc_is_installed()) { echo 'td-container '; } ?>tdc-content-wrap">
                        <?php the_content(); ?>
                    </div>
                    <?php
                    if($td_enable_or_disable_page_comments == 'show_comments') {
                        ?>
                        <div class="td-container">
                            <div class="td-pb-row">
                                <div class="td-pb-span12">
                                    <?php comments_template('', true); ?>
                                </div>
                            </div>
                        </div>
                        <?php
                    }
                    ?>
                </div> <!-- /.td-main-content-wrap -->
    
            <?php endwhile; ?>
        <?php }
    } else {
    
        //no page builder detected, we load a default page template with sidebar / no sidebar
        ?>
    
    <div class="td-main-content-wrap td-container-wrap">
        <div class="td-container tdc-content-wrap <?php echo $td_sidebar_position; ?>">
        <!-- Кривая верстка при неиспользуемом bread crumb 
            <div class="td-crumb-container">
                <?php // echo td_page_generator::get_page_breadcrumbs(get_the_title()); ?>
            </div>
            -->
            <div class="td-pb-row">
                <?php
                switch ($loop_sidebar_position) {
                    default:
                        ?>
                            <div class="td-pb-span9 td-main-content" role="main">
    
                                <div class="td-ss-main-content">
                                
                                    <?php
                                    if (have_posts()) {
                                        while ( have_posts() ) : the_post();
                                            ?>
                                            <div class="td-page-header">
                                                                                          
                            <div class="td-block-title-wrap">
                                                                <h1 class="block-title">
                                                                    <span class="td-pulldown-size"><?php the_title() ?></span>
                                                                </h1>
                                                            </div>
                                               
                                            </div>
                                            <div class="td-page-content">
                                                <div class="content-wrapper">
                                                     <div class="gallery">
                                                <!--<?php
                                                    the_content();
                                                    endwhile;//end loop
                                                    }
                                                ?>-->
                                                
                                                     <?php echo do_shortcode('[slide-anything id=928644]'); ?> 
                              
                                                    </div>
                                                    <!-- Gallery end -->
                                                    <!-- Description start -->
                                                    <div class="description-wrapper">
                                                        <div class="district-description-wrapper">
                                                            <h3>Описание района</h3>
                                                            <p>В 1930-е годы началось формирование Комаровской площади (ныне Якуба Коласа). Подверглись реконструкции так называемые Комаровские вилы (слияние бывших Логойского и Борисовского трактов) и началось возведение Института физкультуры. В 1939 году его здание уже вошло в строй. Минск постепенно разрастался. Учитывая значительный рост населения столицы (218 тысяч человек) Президиум ЦИК БССР 17 марта 1938 года принял Постановление об образовании в столице республики трех городских районов: Сталинского, Когановичского и Ворошиловского (с 2 ноября 1961 года — Советского района). В связи с расширением города Советский район делился два раза. Именно из его состава образовался сначала Первомайский, а затем и Центральный районы города Минска (1969 год).</p>
                                                        </div>
                                                    </div>
                                                    <!-- Description end -->
    
                                                    <!-- JS section start-->
                                                    <script>
                                                        var mySwiper = new Swiper('.swiper-container', {
                                                            slidesPerView: 4,
                                                            centeredSlides: true,
                                                            spaceBetween: 10,
                                                            breakpoints: {
                                                                // when window width is <= 499px
                                                                450: {
                                                                    slidesPerView: 2,
                                                                    spaceBetweenSlides: 10,
                                                                },
                                                                550: {
                                                                    slidesPerView: 3,
                                                                    spaceBetweenSlides: 30,
                                                                },
                                                                // when window width is <= 999px
                                                                999: {
                                                                    slidesPerView: 3,
                                                                    spaceBetweenSlides: 30,
                                                                },
                                                            },
                                                            grabCursor: true,
                                                            direction: 'horizontal',
                                                            loop: true,
                                                            // Navigation arrows
                                                              navigation: {
                                                                nextEl: '.swiper-button-next',
                                                                prevEl: '.swiper-button-prev',
                                                            },
    
                                                              // And if we need scrollbar
                                                              scrollbar: {
                                                                el: '.swiper-scrollbar',
                                                            },
                                                        })
                                                    </script>
                                                    <!-- JS section end-->
    <?php if ($posts) : $counter = 0;?>
                                                    <div class="district-news">
                                                        <div class="td_block_wrap td_block_15 td-pb-border-top td_block_template_1 td-column-2 td_block_padding">
                                                            <div class="td-block-title-wrap">
                                                                <h4 class="block-title">
                                                                    <span class="td-pulldown-size">Общество</span>
                                                                </h4>
                                                            </div>
                                                            <div class="td_block_inner td-column-2">
                                                                 <div class="td-block-row">
                                                                   <?php $posts = new WP_Query( [
                                                  'orderby' => 'date',
                                                  'posts_per_page' => 6,
                                                  'tax_query' => [
                                                  'relation' => 'AND',
                                                            [
                                                            'taxonomy' => 'category',
                                                            'field'    => 'id',
                                                            'terms'    => array( 76967, 2 ),
                                                            'operator' => 'AND',
                                                                            ]
                                                                            ]
                                                                            ] );?>	
                                                                    <?php foreach ($posts as $post) : setup_postdata ($post); $counter++; $thumbnail_attributes = wp_get_attachment_image_src( get_post_thumbnail_id(), 'thumbnail' );?>
                                                                    <div class="td-block-span4">
                                                                        <div class="td_module_mx4 td_module_wrap td-animation-stack">
                                                                            <div class="td-module-image">
                                                                                <div class="td-module-thumb">
                                                                                    <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>">
                                                                                        <img width="320" height="240" class="entry-thumb" src="<?php echo $thumbnail_attributes[0];?>" alt="<?php the_title(); ?>" title="<?php the_title(); ?>">
                                                                                    </a>
                                                                                </div>                            
                                                                            </div>
                                                                                <!--<div class="td-module-meta-info">
                                                                                    <span class="td-post-date">
                                                                                        <time class="entry-date updated td-module-date" ><?php the_date(); ?></time>
                                                                                    </span>            
                                                                                </div>-->
                                                                                <h3 class="entry-title td-module-title">
                                                                                    <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a>
                                                                                </h3>
                                                                        </div>
                                                                    </div>
    
                                                                    <?php if($counter % 3 === 0) {echo '</div>
                                                                        <div class="td-block-row">';
                                                                    }?>
                                                                    <?php endforeach; ?>                                                                
                                                                 </div>
                                                            </div>
                                                        </div>
                                                    </div>

    https://prnt.sc/1xgu18f Вот что получил
    Ссылка на страницу https://minsknews.by/sovetskij-rajon/

    • Ответ изменён 2 года, 5 месяцев назад пользователем rstrah.
    • Ответ изменён 2 года, 5 месяцев назад пользователем rstrah.

    У тебя стоит и так autoplay, постер можно убрать и сразу видос пускать.

    Smart Scroll Posts не решает проблему

    Форум: Плагины
    Тема: Watermark
    Автор rstrah

    (@rstrah)

    Спасибо за помощь, работает так как и хотел!

    Форум: Плагины
    Тема: Watermark

    Спасибо большое за ответ на мой вопрос, как попробую, отпишу и если все ок закрою тему как решенную)

    Спасибо за предложенный вариант )

    Решил проблему , не там ставил if
    Вот код , мб кому пригодиться

    function migration_thumbnail(){
    	if (!is_page(array(34,160))) 
    { 
    	remove_action( 'rara_business_content', 'rara_business_content_start' );
    	remove_action( 'rara_business_page_entry_content', 'rara_business_post_thumbnail', 15 );
    }
    }
    
    add_action( 'wp_head', 'migration_thumbnail' );
    
    function my_content_start(){
    if (!is_page(array(34,160))) 
    { 	
    	echo '<div id="acc-content">';
    	echo '<div class="thumbnail__dlme">';
    	the_post_thumbnail();
    	echo '</div>';
    	echo '<div id="content" class="site-content">';
        echo '<div class="container">';
    	rara_business_breadcrumb();
    	rara_business_page_header();
    	echo '<div class="content-grid">';	
    }
    }
    
    add_action( 'rara_business_content', 'my_content_start' );
    	

    @fevenili , благодарю за помощь )

    .main-navigation a
    {
    font-size:30px; /* сами установите нужный вам размер */
    }

    Но это не поможет сделать ее сразу же под меню, как на примере скриншота выше

    Спасибо )

Просмотр 15 ответов — с 1 по 15 (всего 17)