View 0_reuse_code.js
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
View custom-template.php
<?php | |
// Example for use in one of your custom pod theme templates | |
global $pods; | |
$website = new Pod('websites', 'my-website'); | |
if( !empty( $website->data ) ) | |
{ | |
// Pass Pod ID to function and retrieve array of fields | |
foreach(getPodFields($website->get_field('id')) as $field) | |
// Prepend with Pod name to avoid pollution | |
${'website_'.$field} = $website->get_field($field); |