Skip to content

Instantly share code, notes, and snippets.

View gera3d's full-sized avatar

Gera Yeremin gera3d

View GitHub Profile
@gera3d
gera3d / sort terms in tax
Created October 6, 2016 19:57
Work in progress
<?php include 'key_parts/query-control.php'; //This block of code gets the titles from the pages they are linked to ?>
<?php
/*
Template Name: Procedures Archive
*/
add_filter( 'post_class', 'be_archive_post_class' ); //Make the view for this page broken into 3 sections
// This will trigger if I turn the checkbox as on in the head options area
if (get_field('display_alt_procedure_page' , 'option') ) {
@gera3d
gera3d / css
Created February 1, 2017 17:25
Logic for 3 doc pages
/*add the play button to the right spot - Gera */
.single-procedure > div.site-container > div > div > div:nth-child(3) > div #playhover {
top: 200px;
}
/* making home page play button slightly transparent on smaller screens */
@media only screen and (max-width: 999px) {
.single-procedure > div.site-container > div > div > div:nth-child(3) > div #playhover {
opacity: .5;
top: 0px;
@gera3d
gera3d / gist:c63c0449fbccf5b679c9e18acef5cc87
Created February 2, 2017 16:36
Versions we added to woody
Buzz
Full Testimonials copy breakout on query pages
X - Footer schema Swap
X - Header Scripts in procedures and testimonials
X - Add custom body area to testimonials
Pocohontes Plus
X - Add Custom Field to footer schema
X - Add Body area to schema Footer
X - Fix Breadcrumb Schema Error
add_filter("gform_confirmation", "confirm_change", 10, 4);
function confirm_change($confirmation, $form, $lead, $ajax){
$confirmation = array('redirect');
return $confirmation;
header("Location: http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]");
exit;
}
@gera3d
gera3d / Sample_Facebook_Link.js
Created February 21, 2017 22:31
Just some sample code I need to share
<script>
function getScreenSize() {
// in pixels
if ( screen.width < 500 || screen.height < 500)
window.open('fb://profile/103471319718707')
}
</script>
<strong>Where would you like to review us?</strong>
<br><br>
@gera3d
gera3d / Welcome to Our Practice
Last active April 20, 2017 23:17
Welcome to Our Practice
<div class="row no-gutters">
<p>Thank you for choosing Los Angeles Center for Oral & Maxillofacial Surgery for your upcoming appointment. As a patient, you can expect to be treated with personalized, compassionate, state-of-the-art care in a comfortable and friendly environment. Below, we’ve included important information about our practice and your upcoming procedure. Please review these videos before your first consultation. We look forward to caring for you!</p>
<hr>
<h2>Hear From Our [urlparam param="keyword" /] Patients Like You!</h2>
<hr>
<div class="col-md-4 col-sm-6 col-xs-12">
<a class="fancybox-youtube hoverZoomLink" href='https://www.youtube.com/embed/[urlparam param="v1" default="0J4YQpEVFxM" /]?rel=0&amp;autohide=1&amp;showinfo=0' ><span id="playhover" class="white"></span><img class="alignnone size-large wp-image-136" height="483" src='https://img.youtube.com/vi/[urlparam param="v1" default="0J4YQpEVFxM" /]/mqdefault.jpg' width="858"><br></a>
</div>
<div class="col-md-4 col-sm-6 col-xs
@gera3d
gera3d / Your Upcoming Appointment
Last active November 14, 2017 22:40
Your Upcoming Appointment - Call in reminders in permalink
<div class="row no-gutters">
<div class="col-md-6 col-sm-6">
<hr>
<h2>Watch This Important Information</h2>
<hr>
<p><strong>We look forward to seeing you at your upcoming appointment! </strong>Below, we’ve included important information that you should review before your consultation. Hear from our practice, your doctor, and patients that have undergone the same procedure as you. If you have any questions, please be sure to bring them to your appointment.</p>
</div>
<div class="col-md-6 col-sm-6 ">
@gera3d
gera3d / Instructions Videos
Last active March 29, 2017 18:34
Instructions Videos
<div class="row no-gutters">
<p>It is critical for you to understand your pre-op and post-op instructions! For your convenience, we have created instructional videos that outline everything you need to know about your procedure. We require every patient to fully watch each video below before their surgical appointment. <strong>For your safety, failure to follow pre-operative instructions may result in the need to reschedule your surgical appointment.</strong> </p>
<div class="col-md-6 col-sm-6 col-xs-12">
<hr>
<h3>[urlparam param="keyword" /] Pre-Operative Instructions</h3>
<hr>
<div class=" col-md-12">
<a class="fancybox-youtube hoverZoomLink" href='https://www.youtube.com/embed/[urlparam param="v1" default="0J4YQpEVFxM" /]?rel=0&amp;autohide=1&amp;showinfo=0' ><span id="playhover"></span><img class="alignnone size-large wp-image-136" height="483" src='https://img.youtube.com/vi/[urlparam param="v1" default="0J4YQpEVFxM" /]/maxresdefault.jpg' width="858"><br></a>
</div>
</div>
@gera3d
gera3d / get_term.php
Created March 24, 2017 18:55
Return a list of all 'product' taxonomy terms that are applied to.
$product_terms = wp_get_object_terms( $post->ID, 'product' );
if ( ! empty( $product_terms ) ) {
if ( ! is_wp_error( $product_terms ) ) {
echo '<ul>';
foreach( $product_terms as $term ) {
echo '<li><a href="' . get_term_link( $term->slug, 'product' ) . '">' . esc_html( $term->name ) . '</a></li>';
}
echo '</ul>';
}
}