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 post_published_notification( $ID, $post ) { | |
| $author = $post->post_author; /* Post author ID. */ | |
| $name = get_the_author_meta( 'display_name', $author ); | |
| $email = get_the_author_meta( 'user_email', $author ); | |
| $title = $post->post_title; | |
| $permalink = get_permalink( $ID ); | |
| $edit = get_edit_post_link( $ID, '' ); | |
| $to[] = sprintf( '%s <%s>', $name, $email ); | |
| /*$to = 'youremail@gmail.com';*/ |
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
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
| <html xmlns="http://www.w3.org/1999/xhtml"> | |
| <head> | |
| <title></title> | |
| <style type="text/css"> | |
| body | |
| { | |
| font-family: Arial; | |
| font-size: 10pt; | |
| } |
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 get_header(); ?> | |
| <div id="banner-area" class="banner-area" style="background-image:url(<?php echo get_template_directory_uri(); ?>/images/banner/banner2.jpg)"> | |
| <!-- Subpage title start --> | |
| <div class="banner-text text-center"> | |
| <div class="container"> | |
| <div class="row"> | |
| <div class="col-xs-12"> | |
| <div class="banner-heading"> | |
| <h1 class="page-title" style="color:#FFF; text-transform:uppercase;"><?php |
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_comments_callback( $comment, $args, $depth ) { | |
| $GLOBALS['comment'] = $comment; | |
| ?> <li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>"> | |
| <div class="media comment-author"> | |
| <a class="media-left pull-left flip" href="#"> | |
| <!-- comment author image --> | |
| <img class="img-thumbnail" src="images/blog/comment2.jpg" alt=""> | |
| <?php /*echo get_avatar( get_comment_author_email(), 32, $default_avatar );*/?> | |
| </a> |
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 | |
| /* Template Name: Free Form*/ | |
| get_header() ; | |
| global $post; | |
| global $wpdb; | |
| require_once(ABSPATH . "wp-admin" . '/includes/image.php'); | |
| require_once(ABSPATH . "wp-admin" . '/includes/file.php'); |
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
| <!-- @section googlemapscripts --> | |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title></title> | |
| </head> | |
| <body> | |
| <div class="col-sm-12"> | |
| <div class="form-group"> | |
| <input class="form-control" data-val="true" data-val-required="The Company Address field is required." id="Company_Address" name="Company_Address" placeholder="Enter Company Address*" required="true" type="text" value="" autocomplete="off"> |
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 | |
| get_header(); | |
| global $post; | |
| global $wpdb; | |
| $term = get_queried_object();//get the current term | |
| $taxonomy = $term->taxonomy; | |
| $term_id = $term->term_id;//get the currnet term ID | |
| $term_name = $term->name;//get the current term name | |
| $parent_id = empty( $term_id ) ? 0 : $term_id;//get the parent id of the currnet term | |
| $term_parent = get_term($term->parent);//get the parent term from the child term |
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 | |
| /*********best practice to use <?php woocommerce_breadcrumb( ); ?> this function**********************/ | |
| /*****for custom structure use bellow code in your theme function.php and call <?php if(function_exists('get_hansel_and_gretel_breadcrumbs')): | |
| echo get_hansel_and_gretel_breadcrumbs(); endif; ?> to get the out put**********************/ | |
| //https://www.thewebtaylor.com/articles/wordpress-creating-breadcrumbs-without-a-plugin | |
| function get_hansel_and_gretel_breadcrumbs() | |
| { | |
| // Set variables for later use | |
| $here_text = __( 'You are currently here!' ); |
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 | |
| /********************************************Add a custom filed in the categoy*************************/ | |
| add_action( 'init', 'wpm_product_cat_register_meta' ); | |
| /** | |
| * Register details product_cat meta. | |
| * | |
| * Register the details metabox for WooCommerce product categories. | |
| * | |
| */ | |
| function wpm_product_cat_register_meta() { |
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 style="margin-top: 20px;" id="google_translate_element"></div> | |
| <script type="text/javascript"> | |
| function googleTranslateElementInit() { | |
| new google.translate.TranslateElement({ pageLanguage: 'en', layout: google.translate.TranslateElement.InlineLayout.SIMPLE }, 'google_translate_element'); | |
| } | |
| </script> | |
| <script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script> |