Skip to content

Instantly share code, notes, and snippets.

global $smarty;
$value = get_option( 'discount_code_code' );
$desc = get_option( 'discount_code_desc' );
$smarty->assign('value', $value);
$smarty->assign('desc', $desc);
return $this->display(__FILE__, 'wpheader.tpl', $this->getCacheId());
function pods_in_head(){
global $promos;
$promos = pods('discount_code');
}
add_action('wp_head', 'pods_in_head');
{foreach $items as $item}
{$item->title}
{$item->url}
{/foreach}
public function hookWordpressplug($params)
{
?>
<?php
$smarty = new Smarty;
$menu = wp_get_nav_menu_object("product-categories");
$items = wp_get_nav_menu_items($menu);
<section id="discount"><h1>Daily Discount Special</h1>
<?php
$params = array(
'limit' => 1,
);
$promos = pods('discount_code');
$promos->find($params);
$code= $promos->field('code');
<?php if(have_posts()) : ?>
<?php while(have_posts()) : the_post(); ?>
<h2><?php the_title(); ?></h2>
<?php the_content(); ?>
<?php $relatie = get_post_meta($post->ID, 'relatie.name', true);?>
<?php echo $relatie; ?>
<?php endwhile; ?>
<?php
/**
* The template for displaying all pages.
*
* This is the template that displays all pages by default.
* Please note that this is the WordPress construct of pages
* and that other 'pages' on your WordPress site will use a
* different template.
*
* @package electec
<?php
/**
* The template for displaying all pages.
*
* This is the template that displays all pages by default.
* Please note that this is the WordPress construct of pages
* and that other 'pages' on your WordPress site will use a
* different template.
*
* @package electec
<?php
$params = array(
'where'=> 'featured'
);
$logos = pods('client_logos');
$logos->find('name ASC', $params);
$total_logos = $logos->getTotalRows();
?>
<div id="featured-clients">
$pattern = "/height=\"[0-9]*\"/";
$string = preg_replace($pattern, "height='auto'", $rs['url']);
$pattern = "/width=\"[0-9]*\"/";
$string = preg_replace($pattern, "width='auto'", $string);
echo $string;