New Landing How can we help? Atelier Customize Blog Mini layout meta

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

    Hi,

    Please help to figured out, in which file an I customize the “Blog Mini” blog layout – http://swiftideas.com/blog/blog-mini-sidebar – post meta row?
    For example I’d like to modify this (in bold):

    Sharp looks for 2015
    By Atelier in The Look / September 1, 2014 / 3 comments

    Thanks

    #290158
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please use this custom css code:-

    .mini-item-details {
        font-size:15px !important;
    }

    Thanks
    Mohammad

    #290341
    Integrity
    Member
    Post count: 32

    OK and how can I delete or modify the meta for example delete comments:
    Atelier in The Look / September 1, 2014 / 3 comments

    #290351
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Unfortunately it’s only possible to remove all of the details as they are all a part of the same div

    – Kyle

    #290816
    Integrity
    Member
    Post count: 32

    OK, it’s not a CSS problem, so: what php file contains this blog layout/elements?

    #290862
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please paste this code at functions.php of child theme :-

    
            function sf_get_mini_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( "mini", $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>';
    			}
    			
    			$mini_details = "";
    			if ( $single_author && ! $remove_dates ) {
    			    $mini_details .= '<div class="mini-item-details">' . sprintf( __( 'in %1$s / <time datetime="%2$s">%3$s</time>', 'swiftframework' ),  $post_object['categories'], $post_object['date_str'], $post_object['date']) . '</div>';
    			} else if ( ! $remove_dates ) {
    			    $mini_details .= '<div class="mini-item-details">' . sprintf( __( '<span class="author">By <a href="%2$s" rel="author" itemprop="author">%1$s</a></span> in %3$s / <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 ) {
    			    $mini_details .= '<div class="mini-item-details">' . sprintf( __( '<span class="author">By <a href="%2$s" rel="author" itemprop="author">%1$s</a></span> / %3$s', 'swiftframework' ), $post_object['author'], get_author_posts_url( get_the_author_meta( 'ID' ) ), $post_object['categories']) . '</div>';
    			}
    			
    			// Open output
                $post_item .= '<div class="mini-blog-item-wrap clearfix">';
                
                if ( $post_object['format'] == "quote" || $post_object['format'] == "link" ) {
    
                    $post_item .= '<div class="mini-alt-wrap">';
    
                } else {
    
                    $post_item .= $item_figure;
    
                }
    
                $post_item .= '<div class="blog-details-wrap clearfix">';
    
                if ( $show_title == "yes" && $post_object['format'] != "quote" && $post_object['format'] != "link" ) {
                    $post_item .= '<h3 itemprop="name headline"><a ' . $post_permalink_config . '>' . $post_object['title'] . '</a></h3>';
                }
    
                if ( $show_details == "yes" && $post_object['format'] != "quote" && $post_object['format'] != "link" ) {
    
    				if ( sf_theme_opts_name() == "sf_atelier_options" ) {
                    	$post_item .= $mini_details;
    				} else {
    					$post_item .= $item_details;
    				}
                }
                if ( $show_excerpt == "yes" ) {
                    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>';
                    } else {
                        $post_item .= '<div class="excerpt" itemprop="description">' . $post_object['excerpt'] . '</div>';
                    }
                }
    
                if ( is_sticky() ) {
                    $post_item .= '<div class="sticky-post-icon">'.$sticky_icon.'</div>';
                }
    
                if ( $show_read_more == "yes" ) {
                    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>';
                        }
                    }
                    $post_item .= '<a class="read-more-button" href="' . $post_object['permalink'] . '">' . __( "Read more", "swiftframework" ) . '</a>';
                }
    
    			// Details
                if ( $show_details == "yes" ) {
                	if ( sf_theme_opts_name() != "sf_atelier_options" ) {
                    	$post_item .= sf_get_post_details($postID);
                    }
                    $post_item .= '<div class="comments-likes">';
                    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( $postID, false );
                    }
                    $post_item .= '</div>';
    
                }
    
                $post_item .= '</div>';
    
                if ( $post_object['format'] == "quote" || $post_object['format'] == "link" ) {
    
                    $post_item .= '</div>';
    
                }
    				
    			// Close output
                $post_item .= '</div>';
           	               
    			// Return 
            	return $post_item;
            }

    Thanks
    Mohammad

    #291424
    Integrity
    Member
    Post count: 32

    Thank you, but I need to describe exactly the php file which contain this – I don’t want to modify functions.php.

    #291488
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    If you edit the file directly, it will be overwritten when you update the theme

    It’s better to add the code above to your Child Theme’s functions.php file

    – Kyle

Viewing 8 posts - 1 through 8 (of 8 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