'.esc_html(woocommerce_page_title(false)).''; return; } } if(is_404()){ echo '

'.esc_html__( 'Error 404.', 'fitness-passion' ).'

'; return; } $text = ""; $subtext =""; if(is_front_page() || (is_front_page() && is_home())){ $text = fitness_passion_add_span_last_word(get_theme_mod('fitness_passion_front_page_header_title', 'header title')); $subtext = get_theme_mod('fitness_passion_front_page_header_subtitle', 'header subtitle'); $buttonText = get_theme_mod('fitness_passion_front_page_header_button'); $buttonLink = get_theme_mod('fitness_passion_front_page_header_button_link','#'); } else if(is_home() && ! is_front_page()){ $text = get_theme_mod('fitness_passion_blog_page_header_title', 'Blog'); }else{ the_title('

','

'); return; }?>

'; printf('%2$s%3$s',esc_url(home_url()), esc_html(get_bloginfo('name')), esc_html($separator)); if (!is_home()){ /* no es el blog index.php*/ if (is_category() || is_single() ) { /* Es category.php o es single.php por lo tanto estan dentro del blog */ $categories = get_the_category(''); printf('%2$s%3$s',esc_url($bloglink),esc_html($blogname),esc_html($separator)); printf('%2$s',esc_url(get_category_link($categories[0]->term_id)),esc_html($categories[0]->cat_name)); if (is_single()) { /* Es solo single.php , imprimimos el titulo del post y el separador*/ the_title(esc_html($separator),''); } } elseif (is_page()) { if(fitness_passion_is_woocommerce_activated()){ /* si es una pagina de woocommerce carrito , pago o cuenta*/ if(is_cart() || is_checkout() || is_account_page()){ $blogname = woocommerce_page_title(false); $bloglink = is_shop() ? wc_get_page_id('shop') : get_the_ID(); printf('%2$s%3$s',esc_url($bloglink),esc_html($blogname),esc_html($separator)); } } /* Es page.php , imprimimos el nombre de la pagina*/ the_title('',''); } }else{ printf('%2$s',esc_url($bloglink),esc_html($blogname)); } echo ''; endif; } endif; if(!function_exists('fitness_passion_social_links')): function fitness_passion_social_links(){ ?>
ID ); $catidlist = ''; $excluded = ''; foreach( $categories as $category) { $catidlist .= $category->cat_ID . ","; } if(get_theme_mod('fitness_passion_landing_testimonials_exclude',true)){ $testimonials_slug = get_theme_mod('fitness_passion_landing_testimonial_category', 'testimonials'); if(get_category_by_slug($testimonials_slug)){ $excluded = '-'.get_category_by_slug($testimonials_slug)->term_id; $catidlist .= $excluded; } } // Build our category based custom query arguments $custom_query_args = array( 'posts_per_page' => 3, // Number of related posts to display 'post__not_in' => array($post->ID), // Ensure that the current post is not displayed 'orderby' => 'rand', // Randomize the results 'cat' => $catidlist, // Select posts in the same categories as the current post ); if($type == 'latest'){ // Build our category based custom query arguments $custom_query_args = array( 'posts_per_page' => 5, // Number of related posts to display 'post_type' => 'post', 'cat'=> $excluded, ); } // Initiate the custom query $custom_query = new WP_Query( $custom_query_args ); ?>