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('testimonials') ): | |
echo '<div id="testimonials" class="carousel slide" data-ride="carousel" data-pause="false">'; | |
echo '<div class="carousel-inner">'; | |
$count = 1; | |
while( have_rows('testimonials') ): the_row(); | |
$testimonial = get_sub_field('testimonial_text'); | |
$author = get_sub_field('testimonial_author'); | |
echo '<div class="carousel-item text-center py-5'; | |
if ( $count == 1 ) { |
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 //Add all of this tu custom page template ?> | |
<?php | |
global $wpdb; | |
$error = ''; | |
$success = ''; | |
// check if we're in reset form | |
if( isset( $_POST['action'] ) && 'reset' == $_POST['action'] ) | |
{ |
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 | |
function example_ajax_enqueue() { | |
// Enqueue javascript on the frontend. | |
wp_enqueue_script( | |
'example-ajax-script', | |
get_template_directory_uri() . '/js/simple-ajax-example.js', | |
array('jquery','wp-util') | |
); | |
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
.upload-thumb { | |
display: inline-block; | |
width: 120px; | |
height: 120px; | |
overflow: hidden; | |
background: #e2e2e2; | |
border: 1px solid #cdcdcd; | |
line-height: 120px; | |
margin-bottom: 10px; | |
} |
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 | |
$terms = get_the_terms( $current_post_id, 'products' ); | |
foreach($terms as $term) { | |
$term_title = $term->name; | |
$term_link = get_term_link($term); | |
} | |
?> |
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
$("input#keyword").keyup(function() { | |
if ($(this).val().length > 2) { | |
$("#datafetch").show(); | |
} else { | |
$("#datafetch").hide(); | |
} | |
}); | |
$('#search_submit').on('click',function(){ | |
let searcher = $('#searcher_form'); |
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
<!-- | |
Example 1: Using IF ELSE logic | |
Works with Outlook (Desktop)?: Yes | |
Works with Outlook.com?: No | |
When using IF ELSE logic, Outlook.com will remove content in both conditionals, which is problematic. | |
--> | |
<!--[if mso]> | |
<table border="0" cellpadding="0" cellspacing="0" width="100%"> |