BACK AGAIN
Before i become crazy about that ……
There are so many strange dependencys (H1 in title depending from “Don’t display image on single post” / H1 in Content depending from using ALB or not / H1 in title depending from using ALB or not….) that i have no other idea than to suspect a huge bug.
This is so strange that i cant decide where to begin
Maybe its better to start from scratch.
What i want:
1: using ALB
2: No H1 in Content
3: H1 in title
What do we already got in functions.php
<?php
add_filter('avf_title_args', 'change_title_tag', 10, 2);
function change_title_tag($args,$id)
{
$args['link'] = get_permalink($id);
$args['heading'] = 'div';
return $args;
}
add_filter('avf_title_args', 'fix_single_post_title', 10, 2);
function fix_single_post_title($args,$id)
{
if ( $args['title'] == 'Blog - Die aktuellsten Neuigkeiten' )
{
$args['title'] = get_the_title($id);
$args['link'] = get_permalink($id);
$args['heading'] = 'h1';
}
return $args;
}
//$avia_config['imgSize']['square-custom'] = array('width'=>300, 'height'=>300); // small image for blogs
//$avia_config['imgSize']['square2'] = array('width'=>400, 'height'=>400); // small image for blogs
function enqueue_parent_theme_style() {
wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
}
add_action( 'wp_enqueue_scripts', 'enqueue_parent_theme_style');
function theme_name_scripts() {
wp_enqueue_style( 'style-name', get_stylesheet_uri() );
}
add_action( 'wp_enqueue_scripts', 'theme_name_scripts' );
/* Activate Avia debug mode */
add_action('avia_builder_mode', "builder_set_debug");
function builder_set_debug()
{
return "debug";
}
/* excerpt lenght */
add_filter('avf_postgrid_excerpt_length','avia_change_postgrid_excerpt_length', 10, 1);
function avia_change_postgrid_excerpt_length($length)
{
$length = 150;
return $length;
}
//removes comments from Combo Widget //
class avia_combo_widget extends WP_Widget {
function avia_combo_widget() {
//Constructor
$widget_ops = array('classname' => 'avia_combo_widget', 'description' => 'A widget that displays your popular posts, recent posts, recent comments and a tagcloud' );
$this->WP_Widget( 'avia_combo_widget', THEMENAME.' Combo Widget', $widget_ops );
}
function widget($args, $instance)
{
// prints the widget
extract($args, EXTR_SKIP);
$posts = empty($instance['count']) ? 4 : $instance['count'];
echo $before_widget;
echo "<div class='tabcontainer border_tabs top_tab tab_initial_open tab_initial_open__1'>";
echo '<div class="tab first_tab active_tab widget_tab_popular"><span>'.__('Popular', 'avia_framework').'</span></div>';
echo "<div class='tab_content active_tab_content'>";
avia_get_post_list('cat=&orderby=comment_count&posts_per_page='.$posts);
echo "</div>";
echo '<div class="tab widget_tab_recent"><span>'.__('Recent', 'avia_framework').'</span></div>';
echo "<div class='tab_content'>";
avia_get_post_list('showposts='. $posts .'&orderby=post_date&order=desc');
echo "</div>";
echo '<div class="tab last_tab widget_tab_tags"><span>'.__('Tags', 'avia_framework').'</span></div>';
echo "<div class='tab_content tagcloud'>";
wp_tag_cloud('smallest=12&largest=12&unit=px');
echo "</div>";
echo "</div>";
echo $after_widget;
}
function update($new_instance, $old_instance)
{
$instance = $old_instance;
foreach($new_instance as $key=>$value)
{
$instance[$key] = strip_tags($new_instance[$key]);
}
return $instance;
}
function form($instance) {
//widgetform in backend
$instance = wp_parse_args( (array) $instance, array('count' => 4) );
if(!is_numeric($instance['count'])) $instance['count'] = 4;
?>
<p>
<label for="<?php echo $this->get_field_id('count'); ?>">Number of posts you want to display:
<input class="widefat" id="<?php echo $this->get_field_id('count'); ?>" name="<?php echo $this->get_field_name('count'); ?>" type="text" value="<?php echo esc_attr($instance['count']); ?>" /></label></p>
<?php
}
}
add_action( 'ava_after_main_menu', 'enfold_customization_header_widget_area' );
function enfold_customization_header_widget_area() {
dynamic_sidebar( 'header' );
}
add_action( 'wp_enqueue_scripts', 'enqueue_font_awesome' );
function enqueue_font_awesome() {
wp_enqueue_style( 'font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css' );
}
add_filter('avf_which_archive_output','avf_change_which_archive', 10, 3);
function avf_change_which_archive($output)
{
if(is_category())
{
$output = single_cat_title('',false);
}
return $output;
}
Please help me not to end up in a psychward and let me know how i can achieve that (which by the way should not be that complicate, right?)