【发布时间】:2015-03-22 23:56:06
【问题描述】:
我已经好几天没有尝试修改我的 Osclass 网站了。
我目前正在使用 Bender Black Theme 并在单个单元格中创建了我的类别,我想做的是将“最新项目”与我的类别并排放置,就像下面的 Repurpose Theme 一样,因为 Black Bender将最新项目默认放在类别下
我所做的是更改了我的类别和最新项目 css 并添加 float:left 到它们,或定位到相对..但没有工作。
我也一直在 osclass 论坛中搜索.. 并找到这个问题 How to Add Content Above Category list, Bender 从给出的解决方案中,我在 Header.php 的第 92 行添加了一些代码
<div class="clear"></div>
<div class="latest_ads">
<h1><strong><?php _e('Latest Listings', 'bender_black') ; ?></strong></h1>
<?php if( osc_count_latest_items() == 0) { ?>
<div class="clear"></div>
<p class="empty"><?php _e("No Listing", 'bender_black'); ?></p>
<?php } else { ?>
<div class="actions">
<span class="doublebutton <?php echo $buttonClass; ?>">
<a href="<?php echo osc_base_url(true); ?>?sShowAs=list" class="list-button" data-class-toggle="listing-grid" data-destination="#listing-card-list"><span><?php _e('List', 'bender_black'); ?></span></a>
<a href="<?php echo osc_base_url(true); ?>?sShowAs=gallery" class="grid-button" data-class-toggle="listing-grid" data-destination="#listing-card-list"><span><?php _e('Grid', 'bender_black'); ?></span></a>
</span>
</div>
<?php
View::newInstance()->_exportVariableToView("listType", 'latestItems');
View::newInstance()->_exportVariableToView("listClass",$listClass);
osc_current_web_theme_path('loop.php');
?>
<div class="clear"></div>
<?php if( osc_count_latest_items() == osc_max_latest_items() ) { ?>
<p class="see_more_link"><a href="<?php echo osc_search_show_all_url() ; ?>">
<strong><?php _e('See all listings', 'bender_black') ; ?> »</strong></a>
</p>
<?php } ?>
<?php } ?>
</div>
</div><!-- main -->
但它最终将我的最新项目放在类别上方(就像问题的全部内容一样),它实际上使最新项目内容出现在所有页面中,
从那里我一直在尝试修改我的 css 和 html 代码。但没有运气...
有什么建议吗?? :)
【问题讨论】: