我正在使用WP Residence主题,并希望在滑块上方显示磁贴

时间:2020-12-29 作者:Parth bajaj

<?php
global $align;
global $wpestate_options;
global $is_shortcode;
global $row_number_col;
$title          =   get_the_title();
$col_data       =   wpestate_return_unit_class($wpestate_no_listins_per_row,$wpestate_options[\'content_class\'],$align,$is_shortcode,$row_number_col,$wpestate_property_unit_slider);
$link           =   esc_url( get_permalink() );
$main_image     =   wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), \'listing_full_slider\');
?>  
<div class="<?php echo esc_html($col_data[\'col_class\']);?> listing_wrapper " 
    data-org="<?php echo esc_attr($col_data[\'col_org\']);?>"   
    data-main-title="<?php echo esc_attr($title);?>"
    data-main-modal="<?php echo esc_attr($main_image[1]); ?>"
    data-modal-link="<?php echo esc_attr($link);?>"
    data-listid="<?php echo intval($post->ID);?>" >        
    <div class="property_listing  property_card_default <?php echo wpestate_interior_classes($wpestate_uset_unit); ?> " 
         data-link="<?php   if(  $wpestate_property_unit_slider==0){ echo esc_url($link);}?>">

        <?php if ($wpestate_uset_unit==1) {
            wpestate_build_unit_custom_structure($wpestate_custom_unit_structure,$post->ID,$wpestate_property_unit_slider);
        } else { ?>  
           <div class="listing-unit-img-wrapper">
               <div class="prop_new_details">
                   <div class="prop_new_details_back"></div>       
                   <?php get_template_part(\'templates/property_cards_templates/property_card_media_details\');?>
                   <?php get_template_part(\'templates/property_cards_templates/property_card_location\');?>
                   <div class="featured_gradient"></div>
               </div>  
               <?php get_template_part(\'templates/property_cards_templates/property_card_slider\');?>
               <?php get_template_part(\'templates/property_cards_templates/property_card_tags\'); ?>
           </div>

           <?php get_template_part(\'templates/property_cards_templates/property_card_title\'); ?>    
           <?php get_template_part(\'templates/property_cards_templates/property_card_price\'); ?>
           <?php get_template_part(\'templates/property_cards_templates/property_card_content\'); ?>
           <?php get_template_part(\'templates/property_cards_templates/property_card_details_default\'); ?>

           <div class="property_location">
               <?php get_template_part(\'templates/property_cards_templates/property_card_agent_details_default\'); ?>
               <?php get_template_part(\'templates/property_cards_templates/property_card_actions_type_default\'); ?>
           </div>
        <?php
        }// end if custom structure
        ?>
    </div>             
</div>
我正在使用wp residence主题,希望在图像滑块上方显示标题

1 个回复
SO网友:Tony Djukic

您只需交换两个模板部分。你想要<?php get_template_part(\'templates/property_cards_templates/property_card_title\'); ?> 线条并将其移动到添加滑块的模板包含线上方。我不知道这会对你的格式造成什么影响,但如果你对模板有这么深的了解,那么你应该对CSS非常熟悉。

    <?php
    global $align;
    global $wpestate_options;
    global $is_shortcode;
    global $row_number_col;
    $title          =   get_the_title();
    $col_data       =   wpestate_return_unit_class($wpestate_no_listins_per_row,$wpestate_options[\'content_class\'],$align,$is_shortcode,$row_number_col,$wpestate_property_unit_slider);
    $link           =   esc_url( get_permalink() );
    $main_image     =   wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), \'listing_full_slider\');
    ?>
    <div class="<?php echo esc_html($col_data[\'col_class\']);?> listing_wrapper " 
        data-org="<?php echo esc_attr($col_data[\'col_org\']);?>"   
        data-main-title="<?php echo esc_attr($title);?>"
        data-main-modal="<?php echo esc_attr($main_image[1]); ?>"
         data-modal-link="<?php echo esc_attr($link);?>"
        data-listid="<?php echo intval($post->ID);?>" >      
        <div class="property_listing  property_card_default <?php echo wpestate_interior_classes($wpestate_uset_unit); ?> " 
             data-link="<?php if(  $wpestate_property_unit_slider==0){ echo esc_url($link);}?>">    
            <?php if( $wpestate_uset_unit==1 ){ wpestate_build_unit_custom_structure($wpestate_custom_unit_structure,$post->ID,$wpestate_property_unit_slider);
            } else{ ?>        
                    <div class="listing-unit-img-wrapper">
                        <div class="prop_new_details">
                            <div class="prop_new_details_back"></div>       
                            <?php get_template_part(\'templates/property_cards_templates/property_card_media_details\');?>
                            <?php get_template_part(\'templates/property_cards_templates/property_card_location\');?>
                            <div class="featured_gradient"></div>
                        </div> 
                        <?php get_template_part(\'templates/property_cards_templates/property_card_title\'); ?>
                        <?php get_template_part(\'templates/property_cards_templates/property_card_slider\');?>
                        <?php get_template_part(\'templates/property_cards_templates/property_card_tags\'); ?>
                    </div>
                    <?php get_template_part(\'templates/property_cards_templates/property_card_price\'); ?>
                    <?php get_template_part(\'templates/property_cards_templates/property_card_content\'); ?>
                    <?php get_template_part(\'templates/property_cards_templates/property_card_details_default\'); ?>
                   
                    <div class="property_location">
                        <?php get_template_part(\'templates/property_cards_templates/property_card_agent_details_default\'); ?>
                        <?php get_template_part(\'templates/property_cards_templates/property_card_actions_type_default\'); ?>
                    </div>
                <?php
                }// end if custom structure
                ?>
            </div>             
        </div>

相关推荐

在已发布的页面上拒绝访问,但不在wordpress/wp-admin/上拒绝访问

我有一个网站,在那里,我的请求url的状态突然变为“403禁止”,HTML页面中的访问被拒绝。这个问题只发生在已发布页面的链接上/wp admin/很好,我可以编辑和发布页面。但是当点击页面链接时,我的访问被拒绝了。以下是我的网站的环境详细信息。共享托管</Wordpress框架5.4.2版</我可以通过ftp连接</访问html文件</我试过了禁用所有插件(包括更改插件文件夹名称)。htaccess文件很好,请告诉我要检查哪些权限以及在哪里检查。