Results 1 to 6 of 6

Thread: how to remove "Latest ad" from showing

  1. #1
    Thread Starter
    Member maggisam's Avatar
    Join Date
    Feb 2010
    Location
    Reykjavik, Iceland
    Posts
    50
    Thanks
    0
    Thanked 1 Time in 1 Post

    how to remove "Latest ad" from showing

    One thing has been keeping me up a little.

    How do I remove the Latest Listings form the catnav.

    If I remove the line below from index.php, then the next category in line will NOT be highlighted by default.
    <li<?php if ( is_home() ) { echo " class=\"current-cat\""; } ?>><?php _e('Latest Listings','cp'); ?>

    As a fallback, then I was gonna add a category field to the main view. that way people would se witch category a ad belongs to under Latest Listings.

    But I also fail at this, as I am unable to find what value to call. I have tried ""cat" "category" "categories" "post_cat"
    I think I am on the wrong track here somewhere. PLEASE HELP

    Sincerely
    Magnus

  2. #2
    Member damien's Avatar
    Join Date
    May 2009
    Location
    Melbourne, Australia
    Posts
    91
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: how to remove "Latest ad" from showing

    If I get you right, then removing the latest listings tab will not highlight the next selection because it's category pages from there on, you'd have to change the index.php loop to either pull from the first category instead of the latest listings, or somehow use 'if is home' with http://codex.wordpress.org/Template_...ist_categories.

  3. #3
    Thread Starter
    Member maggisam's Avatar
    Join Date
    Feb 2010
    Location
    Reykjavik, Iceland
    Posts
    50
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: how to remove "Latest ad" from showing

    I have been trying that back and forth.
    I just cant get my head around this. I just dont know those commands so much.

    Sincerely
    Magnus

  4. #4
    Thread Starter
    Member maggisam's Avatar
    Join Date
    Feb 2010
    Location
    Reykjavik, Iceland
    Posts
    50
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: how to remove "Latest ad" from showing

    Today. with some rest hehehe. I was sucessful in making a new col. in main view with category names in there.
    I would mostly still be able to get rid of the latest Listings tab all together. and have the home to show the content from cat 1.

    I did the following.
    fx. in the price col. put this instead.

    <span class="price">
    <?php $category = get_the_category();
    $parent = get_cat_name($category[0]->category_parent);
    if (!empty($parent))
    { echo $parent; echo ' > ' .$category[0]->cat_name; }
    else
    { echo $category[0]->cat_name; }
    ?>
    </span>

  5. #5
    pepsi's Avatar
    Join Date
    Mar 2009
    Location
    New Zealand
    Posts
    14,883
    Thanks
    91
    Thanked 804 Times in 718 Posts

    Re: how to remove "Latest ad" from showing

    Thanks again for sharing maggisam

  6. #6
    shareef790's Avatar
    Join Date
    Feb 2010
    Location
    Australia
    Posts
    60
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Re: how to remove "Latest ad" from showing

    hi

    Can someone pls show me how to remove the 'latest listing' tab completely from the home page step by step please. I am new to this.. much appreciate your help.

    thanks

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)