WordPress.org

Ready to get started?Download WordPress

Forums

Car Demon
[resolved] Can't get sidebar right in archive-cars_for_sale (6 posts)

  1. BroedersC
    Member
    Posted 5 months ago #

    Hi All,

    As displayed in topic 'Not Displaying in the right place? Also, click tabs...', i was able to change the code for displaying the right sidebar widget right in single-cars_for_sale .

    Now i'm dealing with the archive-cars_for_sale, I have copied the CarDemon code into my standard single.php, changed it a little and saved it as archive-cars_for_sale.

    The cars are displayed as they should be, but the right sidebar widget is shown below.

    Any ideas?

    Thanks in advance,

    http://wordpress.org/plugins/car-demon/

  2. Jay
    Member
    Plugin Author

    Posted 5 months ago #

    Instead of using the single.php you might be better off using the archive.php file as a template for archive-cars_for_sale.php

    Can you post a link to your site so we can see exactly what is happening?

    thanks,
    -j

  3. BroedersC
    Member
    Posted 5 months ago #

    Hi Jay,

    Thanks for your quick reply,

    Have thought about using the Archive.php template, but I think the page should look the same as single.php.

    direct link: http://www.brdrsit.nl/segura/voorraad

    -Colin

  4. Jay
    Member
    Plugin Author

    Posted 5 months ago #

    It might, but I've seen several themes where just a couple subtle differences can throw everything off. No worries though, I think this can be an easy fix.

    From what I see in your site it looks like you could move id=sideBar1 up into id=demon-container, which is the same div that holds id=demon-content and then add a css rule to make sideBar1 float:left

    I would do the CSS like this;

    #demon-container #sideBar1 {
         float: left;
    }

    That makes sure the rule only applies to sideBar1 if it is inside the demon-container, thus it won't mess up sideBar1 anywhere else.

    Let us know how that works out.

    -j

  5. BroedersC
    Member
    Posted 5 months ago #

    Hi Jay,

    Makes no difference, but I've found the solution.

    You have to make shure that

    <?php
    do_action( 'car_demon_vehicle_sidebar' );?>

    is assigned to a DIV-ID (<div id="demon-post">).

    It's done in single-, but not in archive-

    Thanks for your help!
    -Colin

  6. Jay
    Member
    Plugin Author

    Posted 5 months ago #

    Hey Colin,

    Glad you got it worked out.

    -j

Reply

You must log in to post.

About this Plugin

About this Topic