This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function pods_in_head(){ | |
global $promos; | |
$promos = pods('discount_code'); | |
} | |
add_action('wp_head', 'pods_in_head'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{foreach $items as $item} | |
{$item->title} | |
{$item->url} | |
{/foreach} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function hookWordpressplug($params) | |
{ | |
?> | |
<?php | |
$smarty = new Smarty; | |
$menu = wp_get_nav_menu_object("product-categories"); | |
$items = wp_get_nav_menu_items($menu); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<section id="discount"><h1>Daily Discount Special</h1> | |
<?php | |
$params = array( | |
'limit' => 1, | |
); | |
$promos = pods('discount_code'); | |
$promos->find($params); | |
$code= $promos->field('code'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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; ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$params = array( | |
'where'=> 'featured' | |
); | |
$logos = pods('client_logos'); | |
$logos->find('name ASC', $params); | |
$total_logos = $logos->getTotalRows(); | |
?> | |
<div id="featured-clients"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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; |