diff --git a/www/wp-content/themes/enfold-cille/functions.php b/www/wp-content/themes/enfold-cille/functions.php index 6caf684..c6ed314 100644 --- a/www/wp-content/themes/enfold-cille/functions.php +++ b/www/wp-content/themes/enfold-cille/functions.php @@ -173,6 +173,9 @@ function avia_change_breadcrumb( $trail, $args ) { elseif ( is_category() ) { $trail = array(); } + elseif ( is_tax( 'quote_author_tag' ) ) { + array_splice( $trail, 1, 0, array( 'Libro de citas' ) ); + } return $trail; } @@ -284,6 +287,14 @@ function social_post_defautl_thumbnail( $html, $post_id, $post_thumbnail_id, $si return $html; } */ +/** + * Remove Reddit as oEmbed provider. + */ +add_filter( 'embed_oembed_html', 'wp_remove_oembed_providers', 10, 2 ); +function wp_remove_oembed_providers( $html, $url ) { + return '' . esc_html( $url ) . ''; +}; + /* * Add a button to display the number of characters in Title and Content editor; * and also add a character counter to the Excerpt box (with no limit). @@ -540,7 +551,7 @@ class enfold_post_footer_widget extends WP_Widget { * See https://wordpress.stackexchange.com/questions/107113/output-before-and-after-the-loop */ register_sidebar( array( - 'name' => 'Displayed After Loop', + 'name' => 'Displayed After Quote', 'id' => 'after-loop', 'description' => '', 'before_widget' => '
', @@ -548,13 +559,32 @@ register_sidebar( array( 'before_title' => '
', 'after_title' => '
', ) ); -add_action( 'loop_end', 'wp_content_after_loop' ); -function wp_content_after_loop( $query ) { - if ( $query->is_main_query() && is_active_sidebar( 'after-loop' ) ) { +add_action( 'loop_end', 'wp_content_after_quote' ); +function wp_content_after_quote( $query ) { + if ( ! $query->is_main_query() ) { + return; + } + if ( ! ( is_post_type_archive( 'quote' ) || is_singular( 'quote' ) ) ) { + return; + } + if ( is_active_sidebar( 'after-loop' ) ) { dynamic_sidebar( 'after-loop' ); } } +/** + * Show all quotes by author with no pagination. + */ +add_action( 'pre_get_posts', 'wp_all_quotes_by_author' ); +function wp_all_quotes_by_author( $query ) { + if ( ! $query->is_main_query() ) { + return; + } + if ( $query->is_tax( 'quote_author_tag' ) ) { + $query->set( 'posts_per_page', -1 ); + } +} + /* * Restore the font size in the tag cloud widget using a copy of the entire Avia * stylesheet "enfold/css/avia-snippet-widget.css" from Enfold 4.5, and removing diff --git a/www/wp-content/themes/enfold-cille/style.css b/www/wp-content/themes/enfold-cille/style.css index ee4edf9..d451dc7 100644 --- a/www/wp-content/themes/enfold-cille/style.css +++ b/www/wp-content/themes/enfold-cille/style.css @@ -1208,6 +1208,10 @@ body.home .quote-text p { transition-delay: 0s; opacity: 1 !important; } +#scroll-top-link.avia-svg-icon svg:first-child { + height: 35px; + margin-top: 6px; +} #scroll-top-link:hover { background-color: #000; } diff --git a/www/wp-content/themes/enfold-cille/taxonomy-quote_author_tag.php b/www/wp-content/themes/enfold-cille/taxonomy-quote_author_tag.php new file mode 100644 index 0000000..b486b99 --- /dev/null +++ b/www/wp-content/themes/enfold-cille/taxonomy-quote_author_tag.php @@ -0,0 +1,90 @@ + avia_which_archive() ) ); + + do_action( 'ava_after_main_title' ); + + /** + * @since 5.6.7 + * @param string $main_class + * @param string $context file name + * @return string + */ + $main_class = apply_filters( 'avf_custom_main_classes', 'av-main-' . basename( __FILE__, '.php' ), basename( __FILE__ ) ); +?> + +
'> + +
+ +
units ' 'content' ) );?>> + +
+ +
+ + array() ); + $post_type_obj = array(); + + foreach( $posts as $post ) + { + $sorted[ $post->post_type ][] = $post; + if( empty( $post_type_obj[ $post->post_type] ) ) + { + $post_type_obj[ $post->post_type ] = get_post_type_object( $post->post_type ); + } + } + + $avia_config['blog_style'] = apply_filters( 'avf_blog_style', avia_get_option( 'blog_style', 'multi-big' ), 'tag' ); + + foreach( $sorted as $key => $post_type ) + { + if( empty( $post_type ) ) + { + continue; + } + + $args = array_merge( $wp_query->query_vars, array( 'post_type' => $key ) ); + query_posts( $args ); + + $more = 0; + get_template_part( 'includes/loop', 'index' ); + + $wp_query = $backup_query; + } + + if ( is_active_sidebar( 'after-loop' ) ) : + echo '
'; + dynamic_sidebar( 'after-loop' ); + echo '
'; + endif; + ?> + + +
+ + + +
+ +
+ +