New Landing How can we help? Atelier Blog posts title H1 to H2

Viewing 2 posts - 1 through 2 (of 2 total)
  • Posted in: Atelier
  • #291436
    Integrity
    Member
    Post count: 32

    Hi,

    I’d like to start a standalone blog with this layout:
    http://swiftideas.com/blog/blog-standard-sidebar
    but my SEO agency tell me that this layout H tags doesn’t perfect.

    So, I need to change the posts title H1 tag to H2 and the widget titles from H3 to H2.
    Please, describe for what php file need to modify!

    Thanks

    #291493
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Hi

    1) Add this to your child theme’s functions.php file:

    /* GET TIMELINE POST
        ================================================== */
        if ( ! function_exists( 'sf_get_timeline_post' ) ) {
            function sf_get_timeline_post( $postID, $thumb_type, $fullwidth, $show_title, $show_excerpt, $show_details, $show_read_more, $content_output, $excerpt_length ) {
    			
    			global $sf_options;
    			$single_author = $sf_options['single_author'];
    			$remove_dates  = $sf_options['remove_dates'];
    			
    			// Get Post Object
    			$post_object = sf_build_post_object( $postID , $content_output, $excerpt_length );
    			
    			// Link config			
                $post_links_match_thumb = false;
                if ( isset( $sf_options['post_links_match_thumb'] ) ) {
                	$post_links_match_thumb = $sf_options['post_links_match_thumb'];	
                }
                $post_permalink_config = 'href="' . $post_object['permalink'] . '" class="link-to-post"';
                if ( $post_links_match_thumb ) {
                	$link_config = sf_post_item_link();
                	$post_permalink_config = $link_config['config'];
                }
                
                // Variable setup
                $post_item = "";
               	$comments_icon 	 = apply_filters( 'sf_comments_icon', '<i class="ss-chat"></i>' );
               	$link_icon		 = apply_filters( 'sf_link_icon', '<i class="ss-link"></i>' );
               	$sticky_icon   	 = apply_filters( 'sf_sticky_icon', '<i class="ss-bookmark"></i>' );
    			
    			// THUMBNAIL MEDIA TYPE SETUP
    			$item_figure = "";
    			if ( $thumb_type != "none" ) {
    			    $item_figure .= sf_post_thumbnail( "timeline", $fullwidth );
    			}
    			
    			// DETAILS SETUP
    			$item_details = "";
    			if ( $single_author && ! $remove_dates ) {
    			    $item_details .= '<div class="blog-item-details">' . sprintf( __( 'In %1$s on <time datetime="%2$s">%3$s</time>', 'swiftframework' ), $post_object['categories'], $post_object['date_str'], $post_object['date'] ) . '</div>';
    			} else if ( ! $remove_dates ) {
    			    $item_details .= '<div class="blog-item-details">' . sprintf( __( '<span class="author">By <a href="%2$s" rel="author" itemprop="author">%1$s</a></span> in %3$s on <time datetime="%4$s">%5$s</time>', 'swiftframework' ), $post_object['author'], get_author_posts_url( get_the_author_meta( 'ID' ) ), $post_object['categories'], $post_object['date_str'], $post_object['date'] ) . '</div>';
    			} else if ( ! $single_author ) {
    			    $item_details .= '<div class="blog-item-details">' . sprintf( __( '<span class="author">By <a href="%2$s" rel="author" itemprop="author">%1$s</a></span> in %3$s', 'swiftframework' ), $post_object['author'], get_author_posts_url( get_the_author_meta( 'ID' ) ), $post_object['categories'] ) . '</div>';
    			}
    			
    
    			// Open output            
                if ( $show_details == "yes" ) {
                    $post_item .= '<span class="standard-post-date" itemprop="datePublished">' . $post_object['date'] . '</span>';
                }
    
                $post_item .= $item_figure;
    
                if ( $item_figure == "" ) {
                    $post_item .= '<div class="standard-post-content no-thumb clearfix">'; // open standard-post-content
                } else {
                    $post_item .= '<div class="standard-post-content clearfix">'; // open standard-post-content
                }
    
                if ( $show_title == "yes" && $post_object['format'] != "link" && $post_object['format'] != "quote" ) {
                    $post_item .= '<h2 itemprop="name headline"><a ' . $post_permalink_config . '>' . $post_object['title'] . '</a></h2>';
                }
    
                if ($show_details == "yes" && $post_object['format'] != "quote" && $post_object['format'] != "link" ) {
                	if ( sf_theme_opts_name() == "sf_atelier_options" ) {
                		if ( ! $single_author ) {
                		    $post_item .= '<div class="blog-item-details">' . sprintf( __( '<span class="author">By <a href="%2$s" rel="author" itemprop="author">%1$s</a></span> in %3$s', 'swiftframework' ), $post_object['author'], get_author_posts_url( get_the_author_meta( 'ID' ) ), $post_object['categories'] ) . '</div>';
                		}
    
                	} else {
                    	$post_item .= $item_details;
                	}
                }
    
                if ( $show_excerpt == "yes" ) {
                    $post_item .= '<div class="excerpt" itemprop="description">' . $post_object['excerpt'] . '</div>';
                } else if ( $post_object['format'] == "quote" ) {
                    $post_item .= '<div class="quote-excerpt heading-font" itemprop="description">' . $post_object['excerpt'] . '</div>';
                } else if ( $post_object['format'] == "link" ) {
                    $post_item .= '<div class="link-excerpt heading-font" itemprop="description">' . $link_icon . $post_object['excerpt'] . '</div>';
                }
    
                if ( is_sticky() ) {
                    $post_item .= '<div class="sticky-post-icon">'.$sticky_icon.'</div>';
                }
    
                if ( $post_object['download_button'] ) {
                    if ( $post_object['download_shortcode'] != "" ) {
                        $post_item .= do_shortcode( $post_object['download_shortcode'] );
                    } else {
                        $post_item .= '<a href="' . wp_get_attachment_url( $post_object['download_file'] ) . '" class="download-button read-more-button">' . $post_object['download_text'] . '</a>';
                    }
                }
    
                if ( $show_read_more == "yes" && $post_object['format'] != "quote" && $post_object['format'] != "link" ) {
                    $post_item .= '<a class="read-more-button" href="' . $post_object['permalink'] . '">' . __( "Read more", "swiftframework" ) . '</a>';
                }
    
                if ( $show_details == "yes" ) {
    
                    $post_item .= '<div class="comments-likes">';
    
                    if ( $post_object['format'] == "quote" || $post_object['format'] == "link" ) {
                        $post_item .= $item_details;
                    }
    
                    if ( comments_open() ) {
                        $post_item .= '<div class="comments-wrapper"><a href="' . $post_object['permalink'] . '#comment-area">'.$comments_icon.'<span>' . $post_object['comments'] . '</span></a></div>';
                    }
    
                    if ( function_exists( 'lip_love_it_link' ) ) {
                        $post_item .= lip_love_it_link( get_the_ID(), false );
                    }
    
                    $post_item .= '</div>';
                }
    
                $post_item .= '</div>'; // close standard-post-content
           	               
    			// Return 
            	return $post_item;
            }
        }

    2) In the paren theme functions.php file find this code on line 418:

    /* SIDEBAR FILTERS
    	================================================== */
    	function sf_atelier_sidebar_before_title() {
    		return '<div class="widget-heading title-wrap clearfix"><h3 class="spb-heading"><span>';
    	}
    	add_filter('sf_sidebar_before_title', 'sf_atelier_sidebar_before_title');
    
    	function sf_atelier_sidebar_after_title() {
    		return '</span></h3></div>';
    	}
    	add_filter('sf_sidebar_after_title', 'sf_atelier_sidebar_after_title');

    And change the h3 to h2

    – Kyle

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register