Forum Replies Created
-
AuthorPosts
-
September 16, 2015 at 11:11 am in reply to: Reactivated: Checking for value of a repeating field seems not to work #4347
SteveKeymasterGreat. Closing ticket.
September 15, 2015 at 4:02 pm in reply to: Reactivated: Checking for value of a repeating field seems not to work #4344
SteveKeymaster@cosmocanuck– Your new data is in an array with the key of [0], so you need to tell this to Piklist:
piklist('buy-tickets-template', array('data' => $ticket_links[0], 'loop' => 'data'));Let me know if that works for you.
SteveKeymasterGlad to help. Closing ticket.
SteveKeymaster@vagelis– Only include the Page parameter in the Workflow header file. Remove it from all the others:
Page: post.php, post-new.php, post-edit.php, admin.phpSeptember 15, 2015 at 12:33 pm in reply to: Checking for value of a repeating field seems not to work #4337
SteveKeymasterGreat! Closing ticket.
SteveKeymasterPiklist will be ready before November 12, which is the current release date for PHP 7.
SteveKeymaster@vagelis— I thought it would. Piklist does everything the WordPress way, so if it works in WordPress, it should work in Piklist.
September 15, 2015 at 12:17 pm in reply to: Checking for value of a repeating field seems not to work #4333
SteveKeymasterget_post_metahas a third parameter, which you set totrue. From the codex page for get_post_meta:
Whether to return a single value.However, in your code you are looking for an array key, not a single value:
$ticket_links[0], so you should set that parameter tofalse:
$ticket_links = get_post_meta($post->ID, 'ticket_links', false);The best way to debug this in the future is to look at your data. PHP has a function,
print_r, that helps you do this. However,print_rdoesn’t always display values in the easiest to read format, so Piklist has a function to help:piklist::pre(). You can use either.So, to debug in the future do something like this:
$ticket_links = get_post_meta($post->ID, 'ticket_links', true); piklist::pre($ticket_links);
You will see that there is no [0] key for you to check.
Now, change the third parameter to false:
$ticket_links = get_post_meta($post->ID, 'ticket_links', false); piklist::pre($ticket_links);
WordPress now added that key for you.
Hope that helps, and makes sense.
September 15, 2015 at 11:56 am in reply to: Demos: profile 'default' workflow tab missing info #4328
SteveKeymaster@vagelis– The easiest way for us to debug is if you zip up everything and email to [email protected]
September 15, 2015 at 11:52 am in reply to: Checking for value of a repeating field seems not to work #4325
SteveKeymaster@cosmocanuck— What version of Piklist are you using?
SteveKeymasterAlways happy to help. Closing ticket
September 13, 2015 at 10:10 pm in reply to: Checking for value of a repeating field seems not to work #4318
SteveKeymaster@cosmocanuck– Can you post your field code for
ticket_links? -
AuthorPosts