'; } } add_action( 'wp_head', 'blog_rider_pingback_header' ); /** * Get an array of post id and title. * */ function blog_rider_get_post_choices() { $choices = array( '' => esc_html__( '--Select Post--', 'blog-rider' ) ); $args = array( 'numberposts' => -1, ); $posts = get_posts( $args ); foreach ( $posts as $post ) { $id = $post->ID; $title = $post->post_title; $choices[ $id ] = $title; } return $choices; } if( !function_exists( 'blog_rider_get_page_choices' ) ) : /* * Function to get pages */ function blog_rider_get_page_choices() { $pages = get_pages(); $page_list = array(); $page_list[0] = esc_html__( '--Select Page--', 'blog-rider' ); foreach( $pages as $page ){ $page_list[ $page->ID ] = $page->post_title; } return $page_list; } endif; /** * Get an array of cat id and title. * */ if( !function_exists( 'blog_rider_get_post_cat_choices' ) ) : /* * Function to get categories */ function blog_rider_get_post_cat_choices() { $categories = get_terms( 'category' ); $choices = array('' => esc_html__( '--Select Category--', 'blog-rider' )); foreach( $categories as $category ) { $choices[$category->term_id] = $category->name; } return $choices; } endif; /** * Checks to see if we're on the homepage or not. */ function blog_rider_is_frontpage() { return ( is_front_page() && ! is_home() ); } /** * Checks to see if Static Front Page is set to "Your latest posts". */ function blog_rider_is_latest_posts() { return ( is_front_page() && is_home() ); } /** * Checks to see if Static Front Page is set to "Posts page". */ function blog_rider_is_frontpage_blog() { return ( is_home() && ! is_front_page() ); } /** * Checks to see if the current page displays any kind of post listing. */ function blog_rider_is_page_displays_posts() { return ( blog_rider_is_frontpage_blog() || is_search() || is_archive() || blog_rider_is_latest_posts() ); } /** * Shows a breadcrumb for all types of pages. This is a wrapper function for the Breadcrumb_Trail class, * which should be used in theme templates. * * @since 1.0.0 * @access public * @param array $args Arguments to pass to Breadcrumb_Trail. * @return void */ function blog_rider_breadcrumb( $args = array() ) { $breadcrumb = apply_filters( 'breadcrumb_trail_object', null, $args ); if ( ! is_object( $breadcrumb ) ) $breadcrumb = new Breadcrumb_Trail( $args ); return $breadcrumb->trail(); } /** * Pagination in archive/blog/search pages. */ function blog_rider_posts_pagination() { $archive_pagination = get_theme_mod( 'blog_rider_archive_pagination_type', 'numeric' ); if ( 'disable' === $archive_pagination ) { return; } if ( 'numeric' === $archive_pagination ) { the_posts_pagination( array( 'prev_text' => blog_rider_get_icon_svg( 'menu_icon_up' ), 'next_text' => blog_rider_get_icon_svg( 'menu_icon_up' ), ) ); } elseif ( 'older_newer' === $archive_pagination ) { the_posts_navigation( array( 'prev_text' => blog_rider_get_icon_svg( 'menu_icon_up' ) . ''. esc_html__( 'Older', 'blog-rider' ) .'', 'next_text' => ''. esc_html__( 'Newer', 'blog-rider' ) .'' . blog_rider_get_icon_svg( 'menu_icon_up' ), ) ); } } function blog_rider_custom_color_scheme() { if ( 'custom' != get_theme_mod( 'blog_rider_color_scheme' ) ) { return; } $color = get_theme_mod( 'blog_rider_custom_color_scheme', '#ff8737' ); $custom_css = ' /*---------------------------------------- Color ------------------------------------------*/ a, .site-title a:hover, .site-title a:focus, .main-navigation ul#primary-menu li.current-menu-item > a, .main-navigation ul#primary-menu li:hover > a, .main-navigation ul#primary-menu li:focus > a, .main-navigation a:hover, .main-navigation a:focus, .main-navigation ul.nav-menu > li > a:hover, .main-navigation ul.nav-menu > li > a:focus, #services-section article .entry-title a:hover, #services-section article .entry-title a:focus, #projects-section .entry-title a:hover, #projects-section .entry-title a:focus, #projects-section .entry-meta .cat-links a:hover, #projects-section .entry-meta .cat-links a:focus, .blog-posts-wrapper .entry-container .entry-title a:hover, .blog-posts-wrapper .entry-container .entry-title a:focus, .blog-posts-wrapper .featured-image .entry-meta a:hover, .blog-posts-wrapper .featured-image .entry-meta a:focus, .blog-posts-wrapper .cat-links a, .blog-posts-wrapper .cat-links, .widget_popular_post h3 a:hover, .widget_popular_post h3 a:focus, .widget_popular_post a:hover time, .widget_popular_post a:focus time, .widget_latest_post h3 a:hover, .widget_latest_post h3 a:focus, .widget_latest_post a:hover time, .widget_latest_post a:focus time, .pagination .page-numbers.prev, .pagination .page-numbers.next, .pagination .page-numbers, .pagination .page-numbers.dots:hover, .pagination .page-numbers.dots:focus, .single-post-wrapper span.tags-links a:hover, .single-post-wrapper span.tags-links a:focus, .post-navigation a, .posts-navigation a, .comment-meta .url:hover, .comment-meta .url:focus, .comment-metadata a, .comment-metadata a time, #secondary ul li a:hover, #secondary ul li a:focus { color: ' . esc_attr( $color ) . '; } .main-navigation ul#primary-menu li:hover > svg, .main-navigation ul#primary-menu li:focus > svg, .main-navigation li.menu-item-has-children:hover > a > svg, .main-navigation li.menu-item-has-children > a:hover > svg, .main-navigation li.menu-item-has-children > a:focus > svg, .main-navigation ul#primary-menu > li.current-menu-item > a > svg, .main-navigation ul.nav-menu > li > a.search:hover svg.icon-search, .main-navigation ul.nav-menu > li > a.search:focus svg.icon-search, .main-navigation li.search-menu a:hover svg, .main-navigation li.search-menu a:focus svg, .main-navigation li.search-menu a.search-active svg, .widget_search form.search-form button.search-submit:hover svg, .widget_search form.search-form button.search-submit:focus svg, .pagination .prev.page-numbers svg, .pagination .next.page-numbers svg, .single-post-wrapper span.posted-on svg, .single-post-wrapper span.cat-links svg, .navigation.posts-navigation svg, .navigation.post-navigation svg, .byline svg { fill: ' . esc_attr( $color ) . '; } @media screen and (min-width: 1024px) { .modern-menu .main-navigation ul#primary-menu ul li.current-menu-item > a, .modern-menu .main-navigation ul#primary-menu ul li:hover > a, .modern-menu .main-navigation ul#primary-menu ul li:focus > a, .main-navigation ul#primary-menu ul li.current-menu-item > a { color: ' . esc_attr( $color ) . '; } } /*---------------------------------------- Background Color ------------------------------------------*/ .slick-prev, .slick-next, .btn-default:hover, .btn-default:focus, .slick-dots li.slick-active button, .section-subtitle:after, .btn-primary, .testimonial-slider .entry-subtitle:after, .testimonial-slider .slick-slide:nth-child(1) ul.slick-dots li:nth-child(1) button, .testimonial-slider .slick-slide:nth-child(2) ul.slick-dots li:nth-child(2) button, .testimonial-slider .slick-slide:nth-child(3) ul.slick-dots li:nth-child(3) button, .testimonial-slider .slick-slide:nth-child(4) ul.slick-dots li:nth-child(4) button, .testimonial-slider .slick-slide:nth-child(5) ul.slick-dots li:nth-child(5) button, .testimonial-slider .slick-slide:nth-child(6) ul.slick-dots li:nth-child(6) button, .totop, .pagination .page-numbers.current, .pagination .page-numbers:hover, .pagination .page-numbers:focus, .reply a, #respond input[type="submit"], #projects-section .more-link:hover, #projects-section .more-link:focus, .read-more-link a { background-color: ' . esc_attr( $color ) . '; } .pagination .page-numbers, .pagination .page-numbers { background-color: #eee; } @media screen and (min-width: 1024px) { .main-navigation ul.sub-menu li:hover > a, .main-navigation ul.sub-menu li:focus > a { background-color: ' . esc_attr( $color ) . '; } } /*---------------------------------------- Border Color ------------------------------------------*/ .btn-default:hover, .btn-default:focus, .single-post-wrapper span.tags-links a:hover, .single-post-wrapper span.tags-links a:focus { border-color: ' . esc_attr( $color ) . '; } @media screen and (min-width: 1024px) { .main-navigation ul ul { border-top-color: ' . esc_attr( $color ) . '; } .main-navigation ul.nav-menu > li.menu-item-has-children:hover > a:after { border-bottom-color: ' . esc_attr( $color ) . '; } } '; wp_add_inline_style( 'blog-rider-style', $custom_css ); } add_action( 'wp_enqueue_scripts', 'blog_rider_custom_color_scheme' ); // Add auto p to the palces where get_the_excerpt is being called. add_filter( 'get_the_excerpt', 'wpautop' );