Filter Hook on Single Listing

  • Jason
    0 points

    I am trying to filter out the email and phone number for any listing that is expired.

    I am trying to use the filter hook ‘hook_content_single_listing($c)’ and run some conditional code. Can you help? I’m trying to find key->value pairs or something. I can see the data in posts_meta so I could erase those data, but I would prefer to just filter it from the listing so it’s not permanently lost.

    Here is the code I’m using to dump the data from the filter.
    function dump_it( $c ) {
    echo "<br><br><br><h3>Now we're dumping the hook_content_single_listing data:<br>";
    echo var_dump($c);
    sleep (10);
    return $c;
    add_filter( 'hook_content_single_listing', 'dump_it');

    This gives me some data, but nothing I can really use. What am I missing? It looks like it’s dumping shortcodes, but the “Vehicle Details” fields are what I need. Any help is appreciated.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.