Se mejora la visualización de las citas y se cambia de menú
This commit is contained in:
parent
541c042773
commit
904360e631
7 changed files with 1214 additions and 12 deletions
|
@ -88,12 +88,20 @@ function avia_same_category_filter( $settings ) {
|
|||
*/
|
||||
add_filter( 'avf_title_args', 'fix_single_post_title', 10, 2 );
|
||||
function fix_single_post_title( $args, $id ) {
|
||||
$category = get_the_category();
|
||||
if ( ! empty( $category ) && is_single() && get_post_type() == 'post' ) {
|
||||
// Social title for Twitter, Facebook & LinkedIn categories:
|
||||
$args['title'] = in_array( $category[0]->name, array( 'Twitter', 'Facebook', 'LinkedIn' ) ) ? 'Social' : $category[0]->name;
|
||||
$args['link'] = NULL;
|
||||
$args['heading'] = 'h1';
|
||||
if (is_single()) {
|
||||
$post_type = get_post_type();
|
||||
$category = get_the_category();
|
||||
if ( ! empty( $category ) && $post_type == 'post' ) {
|
||||
// Social title for Twitter, Facebook & LinkedIn categories:
|
||||
$args['title'] = in_array( $category[0]->name, array( 'Twitter', 'Facebook', 'LinkedIn' ) ) ? 'Social' : $category[0]->name;
|
||||
$args['link'] = NULL;
|
||||
$args['heading'] = 'h1';
|
||||
}
|
||||
elseif ( $post_type == 'quote' ) {
|
||||
$args['title'] = 'Libro de citas';
|
||||
$args['link'] = NULL;
|
||||
$args['heading'] = 'h1';
|
||||
}
|
||||
}
|
||||
return $args;
|
||||
}
|
||||
|
@ -574,6 +582,39 @@ class enfold_post_footer_widget extends WP_Widget {
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Enable a new widget sidebar to display widgets after the loop.
|
||||
* See https://stackoverflow.com/questions/39181634/how-to-add-a-widget-after-post-content
|
||||
* See https://wordpress.stackexchange.com/questions/107113/output-before-and-after-the-loop
|
||||
*/
|
||||
register_sidebar( array(
|
||||
'name' => 'Displayed After Loop',
|
||||
'id' => 'after-loop',
|
||||
'description' => '',
|
||||
'before_widget' => '',
|
||||
'after_widget' => '',
|
||||
'before_title' => '<h2>',
|
||||
'after_title' => '</h2>',
|
||||
) );
|
||||
add_action( 'loop_end', 'wp_content_after_loop' );
|
||||
function wp_content_after_loop( $query ) {
|
||||
if ( $query->is_main_query() && is_active_sidebar( 'after-loop' ) ) {
|
||||
dynamic_sidebar( 'after-loop' );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* 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
|
||||
* the font size line in the tag cloud styles.
|
||||
* See https://kriesi.at/support/topic/tag-cloud-widget-display/#post-684196
|
||||
*/
|
||||
add_action( 'wp_enqueue_scripts', 'wp_change_layoutcss', 20 );
|
||||
function wp_change_layoutcss() {
|
||||
wp_dequeue_style( 'avia-widget-css' );
|
||||
wp_enqueue_style( 'avia-widget-css-child', get_stylesheet_directory_uri() . '/avia-snippet-widget.css' );
|
||||
}
|
||||
|
||||
/*
|
||||
* Remove Avia Framework debug information in child theme.
|
||||
* See http://www.kriesi.at/support/topic/removal-of-theme-debug-info/#post-386207
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue