0

It's been days since I'm trying to modify my Osclass web.

I'm currently using Bender Black Theme and have made my Category in single cell, what I'm trying to do is put the "Latest Items" side by side with my Category exactly like Repurpose Theme below, since Black Bender put the Latest Items under the Category as default

enter image description here

What I have done is altered my Category and Latest Items css and add float:left to them, or position into relative.. but no works.

I've been searhing in osclass forum too.. and find this question How to Add Content Above Category list, Bender From the solution given, I've put some code to in my Header.php about in line 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') ; ?> &raquo;</strong></a>
        </p>
    <?php } ?>
<?php } ?>
</div>
</div><!-- main -->

But it ended up my Latest Items placed above the Category (just like the question was all about) and it actually made the Latest Items content appear in all pages,

From there I've been trying modify both my css and html code.. But no luck...

any suggestion ?? :)

4

1 回答 1

0

完成O_o

我像这样在body.home css之后制作新的css->“newcss”

body.home #newcss {width:600px;float:right;margin:20px 0 0 0;}

然后我使用我之前提供的相同代码,像这样把它放在 newcss div 中

<div class="newcss">
<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') ; ?> &raquo;</strong></a>
        </p>
    <?php } ?>
<?php } ?>
</div>

我在function bender_black_draw_categories_list(){绘制类别代码之内和之前对 Black Bender 主题中的 functions.php 进行了更改,并将我的 Header.php 恢复为原来的 ^_^ 它实际上可以工作

在此处输入图像描述

于 2015-04-05T20:10:52.163 回答