= 2 || $page >= 2 )
$title = "$title $sep " . sprintf( __( 'Page %s', 'appointment' ), max( $paged, $page ) );
return $title;
}
add_filter( 'wp_title', 'appointment_wp_title', 10, 2 );
add_action('add_meta_boxes','appointment_slider_meta');
function appointment_slider_meta() {
add_action('admin_enqueue_scripts', 'appointment_admin_enqueue_script');
function appointment_admin_enqueue_script(){
wp_enqueue_script('my-upload-admin',get_bloginfo('template_directory').'/js/media-upload-script.js',array('media-upload','thickbox'));
}
$screens = array( 'post' );
foreach ($screens as $screen) {
add_meta_box(
'slider_section',
__( 'HomePage Slider', 'appointment' ),
'appointment_slider_custom_box',
$screen
);
}
}
function appointment_slider_custom_box( $post ) {
// Use nonce for verification
wp_nonce_field( plugin_basename( __FILE__ ), 'myplugin_noncename' );
// The actual fields for data entry
// Use get_post_meta to retrieve an existing value from the database and use the value for the form
$value = get_post_meta( $post->ID, '_meta_value_key', true );?>
',
) );
}
/*Post date show*/
if ( ! function_exists( 'appointment_posted_on' ) ) :
function appointment_posted_on() {
printf( __( 'Posted by %7$son ', 'appointment' ),
esc_url( get_permalink() ),
esc_attr( get_the_time() ),
esc_attr( get_the_date( 'c' ) ),
esc_html( get_the_date() ),
esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
sprintf( esc_attr__( 'View all posts by %s', 'appointment' ), get_the_author() ),
esc_html( get_the_author() )
);
}
endif;
// code for comment
if ( ! function_exists( 'appointment_comment' ) ) :
/**
* Template for comments and pingbacks.
*
* To override this walker in a child theme without modifying the comments template
* simply create your own appointment(), and that function will be used instead.
*
* Used as a callback by wp_list_comments() for displaying the comments.
*
* @since appointment
*/
function appointment_comment( $comment, $args, $depth ) {
$GLOBALS['comment'] = $comment;
//get theme data
global $comment_data;
//translations
$leave_reply = $comment_data['translation_reply_to_coment'] ? $comment_data['translation_reply_to_coment'] : __('Reply','appointment');
?>