Skip to content

Instantly share code, notes, and snippets.

<?php
/**
* Itinerary Single Contnet Template
*
* This template can be overridden by copying it to yourtheme/wp-travel/content-single-itineraries.php.
*
* HOWEVER, on occasion wp-travel will need to update template files and you (the theme developer).
* will need to copy the new files to your theme to maintain compatibility. We try to do this.
* as little as possible, but it does happen. When this occurs the version of the template file will.
* be bumped and the readme will list any important changes.
function tp_philosophy_pro_posted_on() {
$time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>';
if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
$time_string = '<time class="entry-date published" datetime="%1$s"><a href="%5$s">%2$s</a></time><time class="updated" datetime="%3$s">%4$s</time>';
}
$year = get_the_date( 'Y' );
$month = get_the_date( 'm' );
$day = get_the_date( 'd' );
$time_string = sprintf( $time_string,
<?php
/**
* Product search template.
*
* @package eCommerce_Market_Pro
*/
?>
<?php $args = array(
'number' => '',
'orderby' => 'name',
/**
* Render home news block.
*
* @since 1.0.0
*/
function education_hub_get_home_news_block_content() {
$home_news_section_status = education_hub_get_option( 'home_news_section_status' );
if ( true !== $home_news_section_status ) {
return;
/**
* Testimonial Widget Class
*
* @since WEN Business 1.0
*
*/
class WEN_Business_Testimonial_Widget extends WP_Widget {
function __construct() {
$opts = array(
<?php
/**
*Recommended way to include parent theme styles.
*(Please see http://codex.wordpress.org/Child_Themes#How_to_Create_a_Child_Theme)
*/
add_action( 'wp_enqueue_scripts', 'travel_log_child_style' );
function travel_log_child_style() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
function wp_travel_customize_price_display( $s, $c, $d ) {
global $wp_travel_itinerary;
if ( $wp_travel_itinerary->is_sale_enabled() ) {
return $s;
}
return sprintf( esc_html__('Guide price %1s %2s', 'wp-travel' ), $c, $d );
}
add_filter( 'wp_travel_itinerary_price', 'wp_travel_customize_price_display', 99, 3 );
add_filter( 'get_the_archive_title', function ($title) {
if ( is_category() ) {
$title = single_cat_title( '', false );
} elseif ( is_tag() ) {
$title = single_tag_title( '', false );
} elseif ( is_author() ) {
$title = '<span class="vcard">' . get_the_author() . '</span>' ;
}
return 'Change the tile as per your wish';
});
function wp_travel_customize_price_display( $s, $c, $d ) {
global $wp_travel_itinerary;
if ( $wp_travel_itinerary->is_sale_enabled() ) {
return $s;
}
function tp_philosophy_pro_filter_get_team_options( $input ) {
$options = tp_philosophy_pro_get_theme_options(); // get theme options
$content_type = $options['team_options_content_type'];
$content = array(); // create an empty array
switch ( $content_type ) {
case 'category':
$category_ids = ! empty( $options['team_options_content_category'] ) ? ( array ) $options['team_options_content_category'] : array();
// Bial if no category is selected