Advertisement:

Author Topic: ( HELP ) Location on Header  (Read 1755 times)

sweetcouplebang

  • Newbie
  • *
  • Posts: 21
( HELP ) Location on Header
« on: August 26, 2015, 09:58:30 am »
I am not well verse in PHP,
I don't know how can I display locations after categories on the header.

I would like to have them itemized..
Like under a country all region or cities listed..

Similar to the location on the side bar..
I would like it to be below the categories in the header or main.

assuming like this

US:

Albuquerque    Anchorage    Arlington   Atlanta        Austin 
Baltimore         Bangor          Boston     Charlotte     Chicago 
Cleveland         Columbus     Dallas         Denver       Detroit



Malaysia:

Malacca    Kuala lumpur   Johor
Penang     Pahang            Kedah



Singapore :

Jurong west        Tampinese        Pasir ris
Hougang              Bedok              Geylang



India :

Karnataka      Tamil Nadhu      Magharastra


And so on..


Anyone can help me on this?


I posted this at
http://forums.osclass.org/bender/(-help-)-location-on-header/

But seems like no one there to help me :(


frosticek

  • Hero Member
  • *****
  • Posts: 3948
Re: ( HELP ) Location on Header
« Reply #1 on: August 26, 2015, 11:08:16 am »
@sweetcouplebang
Follow this thread:
http://forums.osclass.org/tips-and-tricks/(tuturial)show-all-regions-and-cities-in-sidebar/

If you have list of regions & cities on your home, than it is just css work to align them

sweetcouplebang

  • Newbie
  • *
  • Posts: 21
Re: ( HELP ) Location on Header
« Reply #2 on: August 27, 2015, 03:40:17 pm »
I am not asking for the sidebar.
I want it in the main page ..

Just below of above the categories.


frosticek

  • Hero Member
  • *****
  • Posts: 3948
Re: ( HELP ) Location on Header
« Reply #3 on: August 27, 2015, 06:21:37 pm »
@sweetcouplebang
It does not matter, you want to know code, not file where to put it (it is main.php btw).

sweetcouplebang

  • Newbie
  • *
  • Posts: 21
Re: ( HELP ) Location on Header
« Reply #4 on: August 27, 2015, 08:41:21 pm »
Yes.. That I know..
When I put the code on the main below the category..
It gives me in Single column..

What I want is something like in tabular.

Like the attachement


sweetcouplebang

  • Newbie
  • *
  • Posts: 21
Re: ( HELP ) Location on Header
« Reply #5 on: August 27, 2015, 08:50:21 pm »
Ok the attachement did not show..


sweetcouplebang

  • Newbie
  • *
  • Posts: 21
Re: ( HELP ) Location on Header
« Reply #6 on: August 27, 2015, 08:51:28 pm »
And also the file I think it should be in the header.php


When I add the code to the header..
My scree looks like this



sweetcouplebang

  • Newbie
  • *
  • Posts: 21
Re: ( HELP ) Location on Header
« Reply #7 on: August 27, 2015, 08:57:25 pm »
I want my locations below or above the category  like the first attachment

When I use the sidebar code.. It gives me all in single line..
I try to play with spaces.. and tabs , And the layout got even worst..


frosticek

  • Hero Member
  • *****
  • Posts: 3948
Re: ( HELP ) Location on Header
« Reply #8 on: August 28, 2015, 12:17:20 pm »
@sweetcouplebang
It is just CSS styling. I cannot help you from image.... post your URL

sweetcouplebang

  • Newbie
  • *
  • Posts: 21
Re: ( HELP ) Location on Header
« Reply #9 on: August 28, 2015, 03:24:04 pm »
it is at ccmembers.com

frosticek

  • Hero Member
  • *****
  • Posts: 3948
Re: ( HELP ) Location on Header
« Reply #10 on: August 28, 2015, 07:34:32 pm »
@sweetcouplebang
Add this code to your css

Code: [Select]
#main .box.location {float:left;clear:both;width:100%;margin:40px 0;}
#main .box.location ul {float:left;clear:both;width:100%;}
#main .box.location ul li {float:left;width:50%;}

sweetcouplebang

  • Newbie
  • *
  • Posts: 21
Re: ( HELP ) Location on Header
« Reply #11 on: August 29, 2015, 03:44:40 am »
AWESOME.. AWESOME...
WOW
 :) :) :) :) :)

Is it possible to make it to 3 or 4 column instead of 2 column?

sweetcouplebang

  • Newbie
  • *
  • Posts: 21
Re: ( HELP ) Location on Header
« Reply #12 on: August 29, 2015, 03:48:15 am »
From the code, I made it 3 column.. 4 column looks a little cramped up.
I bet many guys out there also wanted such thing and searched around..
You are truly AWESOME
Thanks a billion

sweetcouplebang

  • Newbie
  • *
  • Posts: 21
Re: ( HELP ) Location on Header
« Reply #13 on: August 29, 2015, 04:21:10 am »
One more help..

when I go and see the item, the layout is not proper..

i.e http://ccmembers.com/for-sale/animals/example-ad_i1

sweetcouplebang

  • Newbie
  • *
  • Posts: 21
Re: ( HELP ) Location on Header
« Reply #14 on: August 29, 2015, 04:26:23 am »
Ok.. that i solved it too..
I removed the below code from header and shifted to main.php

<div id="cities3">
                    <div class="navigation3">
                        <?php if(osc_count_list_cities() > 0 ) { ?>
                        <div class="box location">
                            <h3><strong><?php _e("Cities", 'bender') ; ?></strong></h3>
                            <ul>
                            <?php while(osc_has_list_cities() ) { ?>
                                <li><a href="<?php echo osc_search_url( array( 'sCity' => osc_list_city_name() ) ) ; ?>"><?php echo osc_list_city_name() ; ?> <em>(<?php echo osc_list_city_items() ; ?>)</em></a></li>
                            <?php } ?>
                            </ul>
                        </div>
                        <?php } ?>
                    </div>




Now the name "Cities"  is too close to the categories item need couple of lines spaces inbetween.. how can i add those?