__( 'Primary Menu', 'pikaxo' ),
)
);
// SET CONTENT WIDTH
if ( ! isset( $content_width ) ) $content_width = 600;
load_theme_textdomain( 'pikaxo' );
}
add_action('after_setup_theme', 'pikaxo_setup');
//Load styles
function pikaxo_load_styles_scripts(){
//NOTE: SOME OF THESE SCRIPTS ARE HOSTED ON A CDN AND ARE NOT STORED LOCALLY... SO THIS THEME MAY NOT RENDER PROPERLY IF YOU ARE NOT CONNECTED TO THE INTERNET
//wp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/css/bootstrap.css');
wp_enqueue_style( 'style', get_template_directory_uri() . '/style.css');
if ( is_singular() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' );
}
add_action('wp_enqueue_scripts', 'pikaxo_load_styles_scripts');
function pikaxo_pingback_wrap() {
if ( is_singular() && pings_open() ) {
echo '';
}
}
add_action( 'wp_head', 'pikaxo_pingback_wrap' );
if (!function_exists('pikaxo_admin_style')) {
function pikaxo_admin_style($hook) {
if ('appearance_page_pikaxo_theme_info_options' === $hook) {
wp_enqueue_style('pikaxo-admin-script-style', get_template_directory_uri() . '/css/pikaxo-admin.css');
}
}
}
add_action('admin_enqueue_scripts', 'pikaxo_admin_style');
//Creating the sidebar
function pikaxo_menu_init() {
register_sidebar(
array(
'name' => esc_html__('Sidebar Widgets', 'pikaxo'),
'id' => 'sidebar-widgets',
'description' => esc_html__('Add sidebar widgets here', 'pikaxo'),
'before_widget' => '
',
));
}
add_action('widgets_init', 'pikaxo_menu_init');
// this increases or decreaes the length of the excerpt on the index page
function pikaxo_excerpt_length( $length ) {
if ( is_admin() ) {
return $length;
}
return 40;
}
add_filter( 'excerpt_length', 'pikaxo_excerpt_length', 999 );
function pikaxo_excerpt_more( $more ) {
//return 'More';
return ' ' . __('Read More', 'pikaxo') . '';
}
add_filter( 'excerpt_more', 'pikaxo_excerpt_more' );
/**
* Fix skip link focus in IE11.
*
* This does not enqueue the script because it is tiny and because it is only for IE11,
* thus it does not warrant having an entire dedicated blocking script being loaded.
*
* @link https://git.io/vWdr2
*/
function pikaxo_skip_link_focus_fix() {
// The following is minified via `terser --compress --mangle -- js/skip-link-focus-fix.js`.
?>