esc_html__( 'Top Menu', 'consulting-company' ),
) );
add_theme_support( 'html5', array(
'comment-form',
'comment-list',
'gallery',
'caption',
) );
// Add theme support for Custom hEADER.
add_theme_support('custom-header', apply_filters('consulting_company_custom_header_args', array(
'default-image' => get_template_directory_uri()."/assets/images/banner.jpg",
'default-text-color' => 'A31A1E',
'width' => 1299,
'height' => 345,
'flex-height' => true,
'header_text' =>true,
)));
// Add theme support for Custom Logo.
add_theme_support( 'custom-logo', array(
'width' => 250,
'height' => 250,
'flex-width' => true,
'flex-height' => true,
'header-text' => array( 'site-title', 'site-description' ),
) );
}
add_action( 'after_setup_theme', 'consulting_company_setup' );
function consulting_company_content_width() {
$GLOBALS['content_width'] = apply_filters( 'consulting_company_content_width', 640 );
}
add_action( 'after_setup_theme', 'consulting_company_content_width', 0 );
/**
* Register widget area.
*
* @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
*/
function consulting_company_widgets_init() {
register_sidebar( array(
'name' => esc_html__( 'Sidebar', 'consulting-company' ),
'id' => 'sidebar-1',
'romana_description' => esc_html__( 'Add widgets here to appear in your sidebar.', 'consulting-company' ),
'before_widget' => '',
'before_title' => '
',
) );
register_sidebar( array(
'name' => __( 'Footer 1', 'consulting-company' ),
'id' => 'footer-1',
'romana_description' => esc_html__( 'Add widgets here to appear in your footer.', 'consulting-company' ),
'before_widget' => '',
'before_title' => '',
) );
register_sidebar( array(
'name' => esc_html__( 'Footer 2', 'consulting-company' ),
'id' => 'footer-2',
'romana_description' => esc_html__( 'Add widgets here to appear in your footer.', 'consulting-company' ),
'before_widget' => '',
'before_title' => '',
) );
register_sidebar( array(
'name' => esc_html__( 'Footer 3', 'consulting-company' ),
'id' => 'footer-3',
'romana_description' => esc_html__( 'Add widgets here to appear in your footer.', 'consulting-company' ),
'before_widget' => '',
'before_title' => '',
) );
register_sidebar( array(
'name' => esc_html__( 'Footer 4', 'consulting-company' ),
'id' => 'footer-4',
'romana_description' => esc_html__( 'Add widgets here to appear in your footer.', 'consulting-company' ),
'before_widget' => '',
'before_title' => '',
) );
}
add_action( 'widgets_init', 'consulting_company_widgets_init' );
/**
* Replaces "[...]" (appended to automatically generated excerpts) with ... and
* a 'Continue reading' link.
*/
function consulting_company_excerpt_more( $link ) {
if ( is_admin() ) {
return $link;
}
global $post;
if ( get_theme_mod( 'hide_post_readmore_button' ) == "" ) {
return '';
}
}
add_filter( 'excerpt_more', 'consulting_company_excerpt_more' );
// Post Excerpt length
function consulting_company_excerpt_length( $length ) {
if ( is_admin() ) { return $length; }
return get_theme_mod('post_content_limit', 16);
}
add_filter( 'excerpt_length', 'consulting_company_excerpt_length', 999 );
/**
* Add a pingback url auto-discovery header for singularly identifiable articles.
*/
function consulting_company_pingback_header() {
if ( is_singular() && pings_open() ) {
printf( '' . "\n", esc_url(get_bloginfo( 'pingback_url' )) );
}
}
add_action( 'wp_head', 'consulting_company_pingback_header' );
// Header background image
if ( ! function_exists( 'consulting_company_header_image' ) ) :
function consulting_company_header_image()
{ ?>
', ', ');
$consulting_company_date = sprintf( '',
esc_url( get_day_link(get_post_time('Y'), get_post_time('m'), get_post_time('j'))),
esc_attr( get_the_time() ),
esc_attr( get_the_date() ),
esc_attr( get_the_date() )
);
if ( $consulting_company_tag_list ) {
/* translators: 1: category name, 2: date time, 3: post author */
$consulting_company_utility_text = esc_html__( ' %2$s %1$s', 'consulting-company' );
} else {
/* translators: 1: date time, 2: author name */
$consulting_company_utility_text = esc_html__( ' %2$s ', 'consulting-company' );
}
printf(
$consulting_company_utility_text,
$consulting_company_tag_list,
$consulting_company_date
);
}
endif;
// Remove Comment Website Field
add_filter('comment_form_default_fields', 'consulting_company_remove_url');
function consulting_company_remove_url($val) {
$val['url'] = '';
return $val;
}
// Comment Form Fields Placeholder
function consulting_company_comment_form_fields( $fields ) {
foreach( $fields as &$field ) {
$field = str_replace( 'id="author"', 'id="author" placeholder="'.esc_attr__('Your Name *','consulting-company').'"', $field );
$field = str_replace( 'id="email"', 'id="email" placeholder="'.esc_attr__('Your Email *','consulting-company').'"', $field );
}
return $fields;
}
add_filter( 'comment_form_default_fields', 'consulting_company_comment_form_fields' );
// Change comment form textarea to use placeholder
function consulting_company_comment_textarea_placeholder( $args ) {
$args['comment_field'] = str_replace( 'textarea', 'textarea placeholder="'.esc_attr__('Your Message *','consulting-company').'"', $args['comment_field'] );
return $args;
}
add_filter( 'comment_form_defaults', 'consulting_company_comment_textarea_placeholder' );
//change text to leave a reply on comment form
function consulting_company_comment_reform ($arg) {
$arg['title_reply'] = ' '.esc_html__('Leave a comment','consulting-company');
return $arg;
}
add_filter('comment_form_defaults','consulting_company_comment_reform');
// Change comment form Submit button text
function consulting_company_change_comment_form_submit_label($arg) {
$arg['label_submit'] = esc_html__('Submit comment','consulting-company') ;
return $arg;
}
add_filter('comment_form_defaults', 'consulting_company_change_comment_form_submit_label');
if ( ! function_exists( 'consulting_company_comment' ) ) :
function consulting_company_comment( $comment, $args, $depth ) {
switch ( $comment->comment_type ) :
case 'pingback' :
case 'trackback' :
// Display trackbacks differently than normal comments.?>
id="comment-">
', '' ); ?>
comment_approved == 1)
{
global $post; ?>