Jump to content


Photo
- - - - -

Noob Code question


  • Please log in to reply
3 replies to this topic

#1 minute14

minute14

    Newbie

  • Members
  • 9 posts
  • Country: Country Flag

Posted 29 July 2012 - 05:12 PM

Ok, in the Customizations add on, I am trying to add some code. I need to be able to pull info from custom post fields info the actual post. I am using gravity forms to create the information and everything seems great... the information appears everywhere it needs to, i just need it pulled into the post.

Im working off the assumption this is what I need. Am i wrong? What am I missing?

add_filter( 'pre_get_posts', 'my_get_posts' );

function my_get_posts( $query ) {
if ( is_home() )
$query->set( 'post_type', array( 'username', 'country', 'website1', 'website2', 'website3', 'website4', 'website5', 'framework', 'language', 'platform', 'specialties', 'whydoyouwant', 'whatdoyoubring', 'whydont', 'anythingelse', ) );

return $query;
}


Thanks :)

#2 minute14

minute14

    Newbie

  • Members
  • 9 posts
  • Country: Country Flag

Posted 30 July 2012 - 12:02 AM

Disregard... I found this post

Please Login or Register to see this Hidden Content

that resolved it.

It also works on Platform Pro...

Thanks :)

#3 Danny

Danny

    Is Awesome!

  • Moderators
  • 17931 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 30 July 2012 - 09:05 AM

Thanks for informing us the issue has been resolved, we appreciate it.

#4 minute14

minute14

    Newbie

  • Members
  • 9 posts
  • Country: Country Flag

Posted 31 July 2012 - 03:51 AM

One more quick question on this... I have a checkbox form that can return up to 9 results to a single custom field and having a challenge showing them all. It posts the first selection, but not all of them. Is there anything in the code here (

Please Login or Register to see this Hidden Content

that needs to be modified to allow this to happen?

Thanks again :)