Support » Plugins » Hacks » What Call Function Should I Use To Get Meta Info?

  • Something so simple should be much easier to do. Any chance you can take a minute to see if you can figure this out?

    On my listing pages I created an accordion jquery at the bottom, as can be seen here:

    As you can see in the sidebar, I have some custom post fields such as “Amenities Not Included In the Price”. I want to include that info that comes after the title (“A once off ZAR . . . “) in the accordion instead of the sidebar. Any idea what the wordpress call function is to do this?

    In the .php page, the code that calls all the custom fields (basically everything below “email company / Send to a friend”) is the following:

    <?php if(!$preview){echo get_post_custom_listing_single_page($post->ID,'<p><span class=”post_cus_field {#HTMLVAR#}”>{#TITLE#} : </span>{#VALUE#}</p>’);}
    elseif($preview && $_REQUEST[‘alook’]){echo get_post_custom_listing_single_page(mysql_real_escape_string($_REQUEST[‘pid’]),'<p><span class=”{#HTMLVAR#}”>{#TITLE#}</span> : {#VALUE#}</p>’);}else{echo get_post_custom_listing_single_page_preview($post->ID,'<p><span class=”post_cus_field {#HTMLVAR#}”>{#TITLE#} : </span>{#VALUE#}</p>’);} ?>

    For something like the “Amenities Not Included In the Price” portion, the custom code for the span class is: post_cus_field not_included_in_price.

    Any ideas?

Viewing 1 replies (of 1 total)
  • Moderator bcworkz


    The side bar code is running a WP loop, I assume the content is in posts that are queried a certain way. A lot of the code you post is CSS related which may not apply to your accordion.

    You’ll need to replicate the query to get the same posts for your accordion loop. Your loop will then need to output the accordion elements interspersed with post content. You might just use basic loop tags like the_content() and the_title().

Viewing 1 replies (of 1 total)
  • The topic ‘What Call Function Should I Use To Get Meta Info?’ is closed to new replies.