Support

Account

Home Forums Add-ons Options Page IDXpress Listings Pages Not Showing Fields

Solving

IDXpress Listings Pages Not Showing Fields

  • Good morning,

    I am using the Options fields to add a secondary nav to a website. These fields are located at the bottom of the header.php file. They show up fine on all pages, posts except when I load the results and individual real estate listings….they disappear. I have tried everything to get these fields to load on these pages….but nothing works.

    Here is an example:

    Working: http://priscillaterrazasrealestae.com
    Not Working: http://priscillaterrazasrealestate.com/idx/?idx-q-Locations=&idx-q-PropertyTypes=&idx-q-BedsMin=&idx-q-BathsMin=&idx-q-PriceMin=&idx-q-PriceMax=

    As you can see the fields disappear directly after the header image.

    Thanks for your help.

  • I don’t know anything about IDXpress plugin, but your problem would indicate that the template that’s showing the listings must be using a different header file than the one you put the code in.

  • Its not though, because the rest of the normal header HTML is populating. Its just the secondary nav fields that isn’t, which are the custom fields. It seems that the listings template just isnt reading the values of the fields.

  • Is anything being output there? For example, if you just put some text after where the options are supposed to be shown, does that text appear on the page?

  • Yes. Just added “Text”. See below.

    <?php if (have_rows('second_buttons','option')):
      while (have_rows('second_buttons','option')): the_row(); ?>
      <div class="button-icons">
    <a href="<?php the_sub_field('button_link','option'); ?>"><div class="icon-circle"><?php the_sub_field('button_icon','option'); ?></div>
      <div class="2ndnav_text">
      <span><?php the_sub_field('intro_title','option'); ?></span>
    <h4><?php the_sub_field('button_title','option');?></h4>
    </div>
    </a>
    </div>
    <?php endwhile;
    endif; ?>
    TEXT

    That rendered where the second nav should be just fine…and this is on the listing page. It seems that the page isn’t reading the option repeater….but on every other post, page it does. I don’t get it.

  • k,

    Where you have ‘TEXT’ put

    
    echo 'GET FIELD = ',get_field('second_buttons','option'),'<br>GET OPTION =',get_option('options_second_buttons');
    

    Does that output anything? What?

  • It outputs

    GET FIELD = 5
    GET OPTION = 5

  • For some reason, on this page, get_field is returning the number of rows in the repeater instead of the nested array of values that it should be returning. Something in interfering with the get_field on this page.

    Is this the plugin that you’re using? https://wordpress.org/plugins/dsidxpress/

  • Let me know about the plugin. If not that one please let me know where I can find the one that you’re using.

    Also, are the only pages on the site that this is happening related to this plugin and you don’t see this on any other page of the site?

    Have you tried deactivating other plugins on the site to see if the problem goes away?

    I’d say to try and deactivate this plugin, but I’m assuming that the page will not load without it, you could still try.

    The problem is not in ACF, so we need to work out where the incompatibility is.

  • Yeah thats it. I did have a “Cannot modify header information – headers already sent by (output started at /some/file.php:11) in /some/file.php on line 483 earlier…

  • Yeah I tried to deactivate all the plugins and the problem is still there. The repeater option works on all other pages except for the IDX pages. On the home page…I have a quick search of listings and featured listings that is pulling data from the MLS…but its a custom template that I made…home_page.php.

    I know you are right….that the individual IDX posts and archive posts are somehow incompatible with ACF. Hmmm….what to do.

  • I looked at the plugin and I don’t see anything with the quick look that sticks out as being a problem. You might want to report this as a problem for that plugin. This type of thing has come up in the past.

    In the mean time, you can fix this by testing to see if the value returned by get_field('repeater_field_name') is a number of an array. If it is a number you can loop through the rows of a repeater manually to get the array and then use that array to show the content instead of using the have_rows() repeater.

    
    // how to loop a repeater field (options) to get values with get_option()
    $repeater = 'repeater_name';
    $subfields = array('field_name_1', 'fiel_name_2', 'etc...');
    $count = intval(get_option('options_'.$repeater));
    $value = array();
    for ($i=0; $i<$count; $i++) {
      $value[$i] = array();
      foreach ($subfields as $field) {
        $field_value = get_option('options_'.$repeater.'_'.$i.'_'.$field);
        // you may need to do additional formatting on the value here
        // since this gets value stored in the database
        // and is not formatted by ACF
        $value[$i][$field] = $field_value;
      }
    }
    
  • Tried that below the have_rows(second_buttons) repeater

    And still not rendering the values. I think its a conflict with the IDXpress, like you said. I did start a support ticket with them. So once they respond I’ll post what the issue is here. Thanks John for your time and help

    – Alex

  • Hi toolboxwebdesign,

    I’m in a similar predicament – none of my ACF fields will render using dsIDXpress, no matter what I try. Just wondering if you ever found a solution?

    Cheers,

    Jacob

Viewing 14 posts - 1 through 14 (of 14 total)

The topic ‘IDXpress Listings Pages Not Showing Fields’ is closed to new replies.