Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter peebz

    (@peebz)

    Thanks again.

    Thread Starter peebz

    (@peebz)

    Hey Chetan,

    It took me all day, but I finally got it! Including new dropdown properties driven by the new category.

    I just kept searching the site files, and the web, until I finally figured it out.

    Thank you very much. Good Karma for you ~

    P

    Thread Starter peebz

    (@peebz)

    Hey Chetan,

    Thanks again but I’m afraid it’s above my head. I’m more of a graphic designer than coder, just trying to change this one aspect of templates developed years ago.

    (Though I will say this: I worked with .asp years ago, and it was much simpler to configure conditional statements!)

    Bottom line, I’ll mickey mouse something, and sincere thanks again for your help.

    P

    Thread Starter peebz

    (@peebz)

    Hi Chetan,

    Thanks so much for your response. I really appreciate it.

    First, the good news:

    On a different template, adding the 2nd category worked like a charm. When an Agent has a bunch of “ID = 8” listings, they all show, but as you can see for this agent, who has only one “ID = 649” listing, it’s rendering perfectly:

    https://bulldogrealtors.com/agent-properties/?agent=Jackie%20Baker

    Alas, that template uses $args = array( vs. query_posts(array(, as follows:

    <div class=”property-inner-bg”>
    <?php
    if(isset($_GET[‘agent’]) && $_GET[‘agent’] !=”) {
    $agent_name = $_GET[‘agent’];

    $paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1;

    $args = array(
    ‘cat’ => ‘8,649’,
    ‘showposts’ => 30,
    ‘meta_query’ => array(
    array(
    ‘key’ => ‘agent’,
    ‘value’ => $agent_name,
    ‘compare’ => ‘LIKE’
    )
    ),
    ‘paged’ => $paged
    );
    ?>

    Per my original question on the original template (https://bulldogrealtors.com/agents/jeff-curtis), the code you provided using query_posts(array( doesn’t break the page, but it seems to be losing the “Agent” key or value. Because when I inserted the code you provided, it displays all of the “8” and “649” posts regardless of the Agent. It didn’t control for the Agent’s name.

    I’m not sure if this makes sense, and if it doesn’t, please don’t worry because I may be able to control the “8” vs. “649” by using different templates all together. But if it’s an easy fix for you, do let me know!

    Thank you again, very kind of you to help.
    P

Viewing 4 replies - 1 through 4 (of 4 total)