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
| /*******************************************************/ | |
| / Shared by www.codewordpress.com / | |
| / Add following code to Function.php file in your theme / | |
| /*******************************************************/ | |
| <?php | |
| function getPostViews($postID){ | |
| $count_key = 'post_views_count'; | |
| $count = get_post_meta($postID, $count_key, true); | |
| if($count==''){ |
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
| <link rel="import" href="../paper-tabs/paper-tabs.html"> | |
| <link rel="import" href="../paper-tabs/paper-tab.html"> | |
| <link rel="import" href="../core-pages/core-pages.html"> | |
| <polymer-element name="my-element"> | |
| <template> | |
| <style> | |
| :host { | |
| position: absolute; |
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 Header for our theme. | |
| * | |
| * Displays all of the <head> section and everything up till <div id="main"> | |
| * | |
| * @package Underscores.me | |
| * @since Underscores.me 1.0 | |
| */ | |
| ?><!DOCTYPE html> |
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
| @media (min-width: 1100px) { | |
| /* Set the image widths */ | |
| .et_pb_gallery_grid .et_pb_gallery_item, | |
| .et_pb_gallery_grid .column_width, | |
| .et_pb_gallery_grid .et_pb_gallery_image, | |
| .et_pb_gallery_grid .et_pb_gallery_image.portrait img { | |
| width: 310px !important; | |
| } | |
| .et_pb_gallery_grid .et_pb_gallery_image img { |
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( $ ) { | |
| // This is to fix an annoying issue with using Before After image slider module within Tabs Module. | |
| $(".et_pb_tabs_controls li").click(function(){setTimeout(function(){$(window).trigger("resize")},800)}) | |
| }); | |
| </script> |
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
| // shortcode to show the module | |
| function showmodule_shortcode($moduleid) { | |
| extract(shortcode_atts(array('id' =>'*'),$moduleid)); | |
| return do_shortcode('[et_pb_section global_module="'.$id.'"][/et_pb_section]'); | |
| } | |
| add_shortcode('showmodule', ‘showmodule_shortcode'); |
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 | |
| Kirki::add_panel( 'test_panel', array( | |
| 'priority' => 10, | |
| 'title' => __( 'My Panel', 'start' ), | |
| ) ); | |
| Kirki::add_section( 'test_section', array( | |
| 'title' => __( 'My Section', 'start' ), | |
| 'panel' => 'test_panel', | |
| ) ); |
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
| <div id="content-carousel" class="content-carousel-widget" data-carousel="swiper"> | |
| <!-- | |
| You can use: data-items="5" for total items display in single page | |
| data-autoplay="true" or "false" for autoplay. | |
| data-loop="true" or "false" for looping the carousel | |
| data-effect="fade" or "cube" for slide changing effects | |
| data-direction="horizontal" or "vertical" for sliding direction | |
| data-initlal="3" for for first active slide | |
| data-center="true" or "false" for centerize slider | |
| --> |
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 | |
| //This is just a dummy gist. | |
| echo 'Hello World'; | |
| ?> |
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 | |
| function my_custom_pt_link( $post_link, $id = 0 ){ | |
| $post = get_post($id); | |
| if ( is_object( $post ) ){ | |
| $terms = wp_get_object_terms( $post->ID, ‘abc ); | |
| if( $terms ){ | |
| return str_replace( ‘%abc%’ , $terms[0]->slug , $post_link ); | |
| } else { | |
| return str_replace( ‘%abc%’ , 'misc' , $post_link ); | |
| } |
OlderNewer