This file contains 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
// Request URL: https://explorer-api.localenergycodes.com/api/graphql | |
{ | |
policies_count: policies( | |
where: [{column: "exclude_in_report", value: "false"}] | |
count: "id" | |
orderBy: [{column: "count_total", order: "DESC"}] | |
) { | |
count_total | |
} |
This file contains 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
<div class="viewport"> | |
<div id="scroll-container"> | |
<!-- content --> | |
</div> <!-- #scroll-container --> | |
</div> <!-- .view-port --> |
This file contains 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 | |
/** | |
* Clean up pagination | |
*/ | |
add_filter( 'wp_pagenavi', __NAMESPACE__ . '\\gc_pagination', 10, 2 ); | |
function gc_pagination($html) { | |
$out = ''; | |
$out = str_replace('<div','',$html); | |
$out = str_replace('class=\'wp-pagenavi\'>','',$out); |
This file contains 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 | |
$depoimentos = get_field( 'depoimentos' ); | |
if ($depoimentos) { | |
echo '<div id="depoimentos-wrapper" class="">', | |
foreach ($depoimentos as $depoimento) { extract($depoimento); | |
$imgsrc = $imagem ? $imagem['src'] : ''; | |
echo '<div class="depoimento-item d-flex">', | |
($imgSrc ? '<div class="image-box"><img src="'.$imgSrc.'" class="img-fluid"></div>' : ''), | |
'<div>', | |
($titulo ? '<h2>'.$titulo.'</h2>' : ''), |
This file contains 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_rows('collapse') ): ?> | |
<div id="accordion" role="tablist"> | |
<?php $i=1; while ( have_rows('collapse') ) : the_row(); ?> | |
<div class="card"> | |
<div class="card-header" role="tab" id="heading-<?php echo $i; ?>"> | |
<h5 class="mb-0"> | |
<a data-toggle="collapse" href="#collapse-<?php echo $i; ?>" aria-expanded="true" aria-controls="collapseOne"> | |
<?php the_sub_field('title'); ?> | |
</a> | |
</h5> |
This file contains 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 | |
/** | |
* Custom Loop Add to Cart. | |
* | |
* Template with quantity and ajax. | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly. | |
global $product; |
This file contains 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 | |
/* | |
Plugin Name: HowTo Plugin | |
Plugin URI: | |
Description: This Plugin demonstrates how you can build your own plugin pages using the WordPress provided draggable metaboxes, requires WordPress 2.7 version, supports WordPress 2.8 changed boxing layout engine | |
Author: Heiko, Frank | |
Author URI: http://bueltge.de | |
Version: 0.1 | |
License: |