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
| <!-- use this as oppsed to a $count ++ var --> | |
| <?php | |
| if($id !== end($type[0])){ echo ',';} | |
| ?> | |
| <!-- the end() checks if its the last value and reset() checks if it is the first. --> |
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
| <style> | |
| .background-img { | |
| width: 100%; | |
| /*set the height to a fix value*/ | |
| height: 260px; | |
| background-repeat: no-repeat; | |
| /*set the focal point*/ | |
| background-position: top; | |
| background-size: cover; | |
| } |
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 | |
| ob_start(); | |
| wp_nav_menu(array('theme_location' => 'primary', 'menu_class' => 'nav navbar-nav')); | |
| $output = htmlspecialchars(ob_get_contents()); | |
| ob_end_clean(); | |
| $menu_items = substr_count($output,'li class'); | |
| ?> |
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 | |
| $post_args = array( | |
| 'post_type' => 'video', | |
| 'post_status' => 'publish', | |
| 'posts_per_page' => '0', | |
| 'meta_key' => 'bs_video_featured', | |
| 'meta_value' => 1 | |
| ); | |
| $post = new WP_Query( $post_args ); | |
| if($post->have_posts()){ |
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
| <script> | |
| jQuery(document).ready(function() { | |
| jQuery('#featured-slider-<?php echo $carousel_id;?>').owlCarousel({ | |
| navSpeed: 400, | |
| items: 1 , | |
| autoplay:false , | |
| autoplayTimeout:10000 , | |
| nav : true, | |
| navText: [ '<i class="fa-chevron-left fa slider-chev featured-left-chev" ></i>' , | |
| '<i class="fa-chevron-right fa slider-chev featured-right-chev"></i>'] , |
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
| col-sm-push-6 | |
| col-sm-6 |
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
| background : none repeat scroll 0 0 rgba(255, 255, 255, 0.85); |
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
| /* Large desktop */ | |
| @media (min-width: 1200px) { ... } | |
| /* Portrait tablet to landscape and desktop */ | |
| @media (min-width: 768px) and (max-width: 979px) { ... } | |
| /* Landscape phone to portrait tablet */ | |
| @media (max-width: 767px) { ... } | |
| /* Landscape phones and down */ |
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
| Add object to db via doctrine | |
| use Yoda\EventBundle\Entity\Event; | |
| $event= new Event(); | |
| $event->setName('Richard'); | |
| $event->setLocation('DeathStar'); | |
| $event->setTime(new \DateTime('tomorrow noon')); | |
| $event->setDetails('HA!, Darth Hates suprises'); |
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
| $var = ($temp = 1 ? 'true' : 'false') ; |
OlderNewer