WordPress.org

Ready to get started?Download WordPress

Forums

Get Custom Field Values
[resolved] Widget pulling Custom Field data from latest post only (6 posts)

  1. tonyallsopp
    Member
    Posted 2 years ago #

    I'm using the Get Custom Field Values plugin (v3.3.1) to pull some custom field data into the footer of individual posts. You can see it as it stands here:

    http://www.rhcoachholidays.com/england/delightful-durham

    This is the data that is being pulled from the custom field: "28th September - 1st October 2012 (p,t&a) £200 per person (no single supplements)".

    I assumed this plugin would pull the corresponding data from each post it is shown below, but it only seems to be pulling in the data from the most recent post, and then displaying it on all the posts.

    I have the post ID set to '0', and the limit to '0' also.

    Please help! I'm pulling my hair out here!

    Thanks in advance,

    Tony

    http://wordpress.org/extend/plugins/get-custom-field-values/

  2. klimam
    Member
    Posted 2 years ago #

    Same problem after installing the latest update 3.3.1 (WP 3.2.1). Version 3.2 of the plugin works with WP 3.2.1. fine!

  3. Sopratutto
    Member
    Posted 2 years ago #

    Same problem, anyone figure out a solution?

  4. patchekohoss
    Member
    Posted 2 years ago #

    there is a bug in the widget.

    you have to change the code of the function widget_body in the file get-custom.widget.php from this:

    // Determine, based on inputs given, which template tag to use.
    		if ( '0' === $post_id )
    			$post_id = 'current';
    
    		$post_id = intval( $post_id );
    		$limit   = intval( $limit );

    to this

    $post_id = intval( $post_id );
    		$limit   = intval( $limit );
    
    		// Determine, based on inputs given, which template tag to use.
    		if ( 0 === $post_id )
    			$post_id = 'current';
  5. gurumark
    Member
    Posted 2 years ago #

    Same problem here using short codes in the posts after the update. Is there any patch?

  6. Scott Reilly
    WordPress & Plugin Dev
    Plugin Author

    Posted 2 years ago #

    Please try v3.3.2 of the plugin as it should fix the issue affecting everyone in this thread.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic