Compare commits
7 commits
Author | SHA1 | Date | |
---|---|---|---|
e08ba95a38 | |||
585a95fac3 | |||
ca2a0b3190 | |||
1239e8f935 | |||
537e4b0b2b | |||
13d5e0581a | |||
5820b34f31 |
3 changed files with 157 additions and 11 deletions
|
@ -111,19 +111,25 @@ function avia_change_tag_page_layout( $layout, $context ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Register new icons as a theme icons fot GitHub and GitLab.
|
* Register new icons as a theme icons.
|
||||||
* See https://kriesi.at/documentation/enfold/custom-social-icons/
|
* See https://kriesi.at/documentation/enfold/custom-social-icons/
|
||||||
*/
|
*/
|
||||||
add_filter( 'avf_default_icons', 'avia_add_custom_icon', 10, 1 );
|
add_filter( 'avf_default_icons', 'avia_add_custom_icon', 10, 1 );
|
||||||
function avia_add_custom_icon( $icons ) {
|
function avia_add_custom_icon( $icons ) {
|
||||||
$icons['github'] = array( 'font' =>'fontello', 'icon' => 'uf09b' );
|
$icons['GitHub'] = array( 'font' =>'fontello', 'icon' => 'uf09b' );
|
||||||
$icons['gitlab'] = array( 'font' =>'fontello', 'icon' => 'uf296' );
|
$icons['GitLab'] = array( 'font' =>'fontello', 'icon' => 'uf296' );
|
||||||
|
$icons['SoloGit'] = array( 'font' =>'fontello', 'icon' => 'ue806' );
|
||||||
|
$icons['Mastodon'] = array( 'font' =>'fontello', 'icon' => 'ue804' );
|
||||||
|
$icons['Bluesky'] = array( 'font' =>'fontello', 'icon' => 'ue805' );
|
||||||
return $icons;
|
return $icons;
|
||||||
}
|
}
|
||||||
add_filter( 'avf_social_icons_options', 'avia_add_custom_social_icon', 10, 1 );
|
add_filter( 'avf_social_icons_options', 'avia_add_custom_social_icon', 10, 1 );
|
||||||
function avia_add_custom_social_icon( $icons ) {
|
function avia_add_custom_social_icon( $icons ) {
|
||||||
$icons['GitHub'] = 'github';
|
$icons['GitHub'] = 'GitHub';
|
||||||
$icons['GitLab'] = 'gitlab';
|
$icons['GitLab'] = 'GitLab';
|
||||||
|
$icons['SoloGit'] = 'SoloGit';
|
||||||
|
$icons['Mastodon'] = 'Mastodon';
|
||||||
|
$icons['Bluesky'] = 'Bluesky';
|
||||||
return $icons;
|
return $icons;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -169,6 +175,9 @@ function avia_change_breadcrumb( $trail, $args ) {
|
||||||
elseif ( is_category() ) {
|
elseif ( is_category() ) {
|
||||||
$trail = array();
|
$trail = array();
|
||||||
}
|
}
|
||||||
|
elseif ( is_tax( 'quote_author_tag' ) ) {
|
||||||
|
array_splice( $trail, 1, 0, array( '<a href="/quotes">Libro de citas</a>' ) );
|
||||||
|
}
|
||||||
return $trail;
|
return $trail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -280,6 +289,14 @@ function social_post_defautl_thumbnail( $html, $post_id, $post_thumbnail_id, $si
|
||||||
return $html;
|
return $html;
|
||||||
} */
|
} */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Remove provider previews.
|
||||||
|
*
|
||||||
|
add_filter( 'embed_oembed_html', 'wp_remove_oembed_providers', 10, 2 );
|
||||||
|
function wp_remove_oembed_providers( $html, $url ) {
|
||||||
|
return '<a href="' . esc_url( $url ) . '" rel="noopener noreferrer" target="_blank">' . esc_html( $url ) . '</a>';
|
||||||
|
} */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Add a button to display the number of characters in Title and Content editor;
|
* 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).
|
* and also add a character counter to the Excerpt box (with no limit).
|
||||||
|
@ -536,7 +553,7 @@ class enfold_post_footer_widget extends WP_Widget {
|
||||||
* See https://wordpress.stackexchange.com/questions/107113/output-before-and-after-the-loop
|
* See https://wordpress.stackexchange.com/questions/107113/output-before-and-after-the-loop
|
||||||
*/
|
*/
|
||||||
register_sidebar( array(
|
register_sidebar( array(
|
||||||
'name' => 'Displayed After Loop',
|
'name' => 'Displayed After Quote',
|
||||||
'id' => 'after-loop',
|
'id' => 'after-loop',
|
||||||
'description' => '',
|
'description' => '',
|
||||||
'before_widget' => '<div class="quotes-after-loop">',
|
'before_widget' => '<div class="quotes-after-loop">',
|
||||||
|
@ -544,13 +561,32 @@ register_sidebar( array(
|
||||||
'before_title' => '<h5>',
|
'before_title' => '<h5>',
|
||||||
'after_title' => '</h5>',
|
'after_title' => '</h5>',
|
||||||
) );
|
) );
|
||||||
add_action( 'loop_end', 'wp_content_after_loop' );
|
add_action( 'loop_end', 'wp_content_after_quote' );
|
||||||
function wp_content_after_loop( $query ) {
|
function wp_content_after_quote( $query ) {
|
||||||
if ( $query->is_main_query() && is_active_sidebar( 'after-loop' ) ) {
|
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' );
|
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
|
* 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
|
* stylesheet "enfold/css/avia-snippet-widget.css" from Enfold 4.5, and removing
|
||||||
|
|
|
@ -1208,9 +1208,18 @@ body.home .quote-text p {
|
||||||
transition-delay: 0s;
|
transition-delay: 0s;
|
||||||
opacity: 1 !important;
|
opacity: 1 !important;
|
||||||
}
|
}
|
||||||
|
#scroll-top-link.avia-svg-icon svg:first-child {
|
||||||
|
height: 35px;
|
||||||
|
margin-top: 6px;
|
||||||
|
}
|
||||||
#scroll-top-link:hover {
|
#scroll-top-link:hover {
|
||||||
background-color: #000;
|
background-color: #000;
|
||||||
}
|
}
|
||||||
|
@media only screen and (max-width: 767px) {
|
||||||
|
.responsive #scroll-top-link {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#top .av_inherit_color a {
|
#top .av_inherit_color a {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
@ -1258,8 +1267,19 @@ body.home .quote-text p {
|
||||||
.av-share-box ul li a {
|
.av-share-box ul li a {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
}
|
}
|
||||||
#top #wrap_all .av-social-link-github:hover a,
|
#top #wrap_all .av-social-link-Mastodon:hover a,
|
||||||
#top #wrap_all .av-social-link-gitlab:hover a {
|
#top #wrap_all .av-social-link-Mastodon:hover a {
|
||||||
|
color: #fff;
|
||||||
|
background-color: #563acc;
|
||||||
|
}
|
||||||
|
#top #wrap_all .av-social-link-Bluesky:hover a,
|
||||||
|
#top #wrap_all .av-social-link-Bluesky:hover a {
|
||||||
|
color: #fff;
|
||||||
|
background-color: #1185fe;
|
||||||
|
}
|
||||||
|
#top #wrap_all .av-social-link-GitHub:hover a,
|
||||||
|
#top #wrap_all .av-social-link-GitLab:hover a,
|
||||||
|
#top #wrap_all .av-social-link-SoloGit:hover a {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
background-color: #bd2c00;
|
background-color: #bd2c00;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,90 @@
|
||||||
|
<?php
|
||||||
|
if( ! defined( 'ABSPATH' ) ){ die(); }
|
||||||
|
|
||||||
|
global $avia_config, $more;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* get_header is a basic wordpress function, used to retrieve the header.php file in your theme directory.
|
||||||
|
*/
|
||||||
|
get_header();
|
||||||
|
|
||||||
|
echo avia_title( array( 'title' => 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__ ) );
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class='container_wrap container_wrap_first main_color <?php avia_layout_class( 'main' ); ?>'>
|
||||||
|
|
||||||
|
<div class='container template-blog '>
|
||||||
|
|
||||||
|
<main class='content <?php avia_layout_class( 'content' ); ?> units <?php echo $main_class; ?>' <?php avia_markup_helper( array( 'context' => 'content' ) );?>>
|
||||||
|
|
||||||
|
<div class="category-term-description">
|
||||||
|
<?php echo term_description(); ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
global $wp_query, $posts;
|
||||||
|
|
||||||
|
$backup_query = $wp_query;
|
||||||
|
|
||||||
|
$sorted = array( 'post' => 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 '<div class="quotes-after-loop" style="margin-top: 80px;">';
|
||||||
|
dynamic_sidebar( 'after-loop' );
|
||||||
|
echo '</div>';
|
||||||
|
endif;
|
||||||
|
?>
|
||||||
|
|
||||||
|
<!--end content-->
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
//get the sidebar
|
||||||
|
$avia_config['currently_viewing'] = 'blog';
|
||||||
|
get_sidebar();
|
||||||
|
?>
|
||||||
|
|
||||||
|
</div><!--end container-->
|
||||||
|
|
||||||
|
</div><!-- close default .container_wrap element -->
|
||||||
|
|
||||||
|
<?php
|
||||||
|
get_footer();
|
Loading…
Add table
Add a link
Reference in a new issue