我正在使用Wordpress事件主題,並且在單個事件頁面上我想要在較小/縱向視口中的主體副本上方顯示左側邊欄內容。有問題的頁面是:http://staging.foxandmonkey.co.uk/event/brunch-808-uk-garage/如何更改列顯示順序手機/平板電腦視圖CSS Wordpress?
這裏是PHP的主題是從拉:
global $tp_sidebar, $tp_content_class, $tp_title;
if ($tp_sidebar) {
$right_class = 'col-sm-7 col-sm-push-5';
$left_class = 'col-sm-5 col-sm-pull-7';
}
else {
$right_class = 'col-sm-8 col-sm-push-4';
$left_class = 'col-sm-4 col-sm-pull-8';
}
?>
<?php tribe_get_template_part('custom/wrapper-start'); ?>
<div id="tribe-events-content" class="tribe-events-single vevent hentry">
<!-- Notices -->
<?php
if (function_exists('tribe_the_notices')) {
tribe_the_notices();
}
elseif (function_exists('tribe_events_the_notices')) {
tribe_events_the_notices();
}
?>
<div class="events-single-right <?php echo esc_attr($right_class); ?>">
<?php while (have_posts()) : the_post(); ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php if (!$tp_title) : ?>
<h2 class="entry-title">
<?php the_title() ?>
</h2>
<?php endif; ?>
<!-- Event featured image, but exclude link -->
<?php if(has_post_thumbnail()) : ?>
<div class="tribe-events-event-image">
<?php the_post_thumbnail('large'); ?>
</div>
<?php endif; ?>
<!-- Event content -->
<?php do_action('tribe_events_single_event_before_the_content') ?>
<div class="tribe-events-single-event-description tribe-events- content entry-content description">
<?php the_content(); ?>
</div>
<!-- .tribe-events-single-event-description -->
<?php do_action('tribe_events_single_event_after_the_content') ?>
</div> <!-- #post-x -->
<?php endwhile; ?>
</div>
<div class="events-single-left <?php echo esc_attr($left_class); ?>">
<?php tribe_get_template_part('custom/cta'); ?>
<!-- Event meta -->
<?php do_action('tribe_events_single_event_before_the_meta') ?>
<?php do_action('tribe_events_single_event_meta_primary_section_start'); ?>
<?php tribe_get_template_part('modules/meta/details'); ?>
<?php do_action('tribe_events_single_event_meta_primary_section_end'); ?>
<?php tribe_get_template_part('modules/meta/venue'); ?>
<?php tribe_get_template_part('modules/meta/map'); ?>
<?php tribe_get_template_part('custom/schedule'); ?>
<?php tribe_get_template_part('custom/custom'); ?>
<?php
// Include organizer meta if appropriate
if (tribe_has_organizer()) {
tribe_get_template_part('modules/meta/organizer');
}
?>
</div>
頁中沒有側邊欄,所以我假定這部分是什麼,是確定左,右內容:
$right_class = 'col-sm-8 col-sm-push-4';
$left_class = 'col-sm-4 col-sm-pull-8';
我對CSS和Bootstrap很新,所以你可以幫我設置一些自定義的CSS來在移動和肖像平板視圖中顯示左邊的權利之前?這裏是目前在主題文件中的CSS:
#tribe-events-content.tribe-events-single {
background: white;
margin: 0 0 30px;
padding: 50px;
}
#tribe-events-content.tribe-events-single .events-single-left {
padding: 0;
margin-bottom: 25px;
}
@media (max-width: 767px) {
#tribe-events-content.tribe-events-single .events-single-left {
min-height: 200px !important;
}
}
@media (min-width: 768px) {
#tribe-events-content.tribe-events-single .events-single-left {
border-right: 1px solid #3ec9ce;
}
}
#tribe-events-content.tribe-events-single .events-single-right {
padding: 0;
}
@media (max-width: 767px) {
#tribe-events-content.tribe-events-single .events-single-right {
min-height: 200px !important;
}
}
感謝您的任何建議,你可以給我!
Brilliant對於Bootstrap如何實現列順序非常完美且非常清晰的解釋! –