Digital experiences for all disciplines
New Landing › How can we help? › Cardinal › Masonry Blog Type Category Label
New Landing › How can we help? › Cardinal › Masonry Blog Type Category Label
- This topic has 19 replies, 4 voices, and was last updated 8 years by Mohammad – SUPPORT.
-
Posted in: Cardinal
-
September 25, 2014 at 4:45 pm #114611
On the Blog Shortcode / Masonry blog type
When you see all the masonry post blocks, all of them have a label of “Article”. This “Article” label is not pulled from the Blog Category that the post belongs to. Even if an article belongs to blog category “White-Papers”, it still shows up as “Article”. How do I get it to show the correct category in this view?
September 26, 2014 at 10:26 am #114830Hi
That label is for the post type, to remove it add this to your custom css:
.masonry-items .details-wrap > h6 { display: none; }
– Kyle
September 26, 2014 at 11:00 am #114845Is there a way to expose the category label then?
September 26, 2014 at 11:08 am #114846Not in that position no
– Kyle
February 3, 2016 at 1:54 am #245873Is there a Way to show Categories Lable in the masonry preview item? like this guy was asking..
February 3, 2016 at 6:51 am #245899Hi,
I am afraid that its not possible.
Thanks
MohammadFebruary 3, 2016 at 11:55 am #245962Then, is it possible to change the position of the elements?
I would like to have the date on top before everything else, so Move the post-details (i’ve already hided everything else like author, likes etc.) on top of the Masonry item.February 3, 2016 at 12:05 pm #245977Hi,
Please provide me specific page url to check and find any solution.
Thanks
MohammadFebruary 3, 2016 at 12:08 pm #245978This reply has been marked as private.February 3, 2016 at 12:56 pm #246001Hi,
Please paste this code at functions.php of child theme.function sf_get_masonry_post( $postID, $thumb_type, $fullwidth, $show_title, $show_excerpt, $show_details, $show_read_more, $content_output, $excerpt_length ) { global $sf_options; // 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>' ); if ( $show_details == "yes" ) { $post_item .= sf_get_post_details($postID); } // THUMBNAIL MEDIA TYPE SETUP $item_figure = ""; if ( $thumb_type != "none" ) { $item_figure .= sf_post_thumbnail( "masonry", $fullwidth ); } if ( $item_figure != "" ) { $post_item .= $item_figure; } // Open output $post_item .= '<div class="details-wrap">'; $post_item .= '<a ' . $post_permalink_config . '></a>'; // Title if ( $post_object['type'] == "post" ) { if ( $post_object['format'] == "standard" ) { $post_item .= '<h6>' . __( "Article", "swiftframework" ) . '</h6>'; } else { $post_item .= '<h6>' . $post_object['format'] . '</h6>'; } } else { $post_item .= '<h6>' . $post_object['type'] . '</h6>'; } if ( $show_title == "yes" && $post_object['format'] != "quote" && $post_object['format'] != "link" ) { $post_item .= '<h2 itemprop="name headline">' . $post_object['title'] . '</h2>'; } else if ( $post_object['format'] == "quote" ) { $post_item .= '<div class="quote-excerpt" itemprop="name headline">' . $post_object['excerpt'] . '</div>'; } else if ( $post_object['format'] == "link" ) { $post_item .= '<h3 itemprop="name headline">' . $post_object['title'] . '</h3>'; } // Excerpt if ( $show_excerpt == "yes" && $post_object['format'] != "quote" ) { $post_item .= '<div class="excerpt" itemprop="description">' . $post_object['excerpt'] . '</div>'; } // Details if ( $show_details == "yes" ) { //$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>'; } // Close output $post_item .= '</div>'; // Return return $post_item; }
Thanks
MohammadFebruary 3, 2016 at 1:08 pm #246007This reply has been marked as private.February 3, 2016 at 1:14 pm #246014Hi,
Please remove the last code and use this new code:-function sf_get_masonry_post( $postID, $thumb_type, $fullwidth, $show_title, $show_excerpt, $show_details, $show_read_more, $content_output, $excerpt_length ) { global $sf_options; // 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( "masonry", $fullwidth ); } if ( $item_figure != "" ) { $post_item .= $item_figure; } if ( $show_details == "yes" ) { $post_item .= sf_get_post_details($postID); } // Open output $post_item .= '<div class="details-wrap">'; $post_item .= '<a ' . $post_permalink_config . '></a>'; // Title if ( $post_object['type'] == "post" ) { if ( $post_object['format'] == "standard" ) { $post_item .= '<h6>' . __( "Article", "swiftframework" ) . '</h6>'; } else { $post_item .= '<h6>' . $post_object['format'] . '</h6>'; } } else { $post_item .= '<h6>' . $post_object['type'] . '</h6>'; } if ( $show_title == "yes" && $post_object['format'] != "quote" && $post_object['format'] != "link" ) { $post_item .= '<h2 itemprop="name headline">' . $post_object['title'] . '</h2>'; } else if ( $post_object['format'] == "quote" ) { $post_item .= '<div class="quote-excerpt" itemprop="name headline">' . $post_object['excerpt'] . '</div>'; } else if ( $post_object['format'] == "link" ) { $post_item .= '<h3 itemprop="name headline">' . $post_object['title'] . '</h3>'; } // Excerpt if ( $show_excerpt == "yes" && $post_object['format'] != "quote" ) { $post_item .= '<div class="excerpt" itemprop="description">' . $post_object['excerpt'] . '</div>'; } // Details if ( $show_details == "yes" ) { //$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>'; } // Close output $post_item .= '</div>'; // Return return $post_item; }
Thanks
MohammadFebruary 3, 2016 at 1:37 pm #246021This reply has been marked as private.February 3, 2016 at 1:55 pm #246028Hi,
Please provide me login detail after installing WPIDE plugin.
Thanks
MohammadFebruary 3, 2016 at 1:59 pm #246030This reply has been marked as private. -
Posted in: Cardinal
You must be logged in and have valid license to reply to this topic.