Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)
  • in reply to: Display categories in post meta section #202527
    flavius
    Member
    Post count: 5

    Hi Kyle,

    Thanks for your suggestion. I found a better way to display categories which was to copy the sf_get_post_details function from includes/sf-theme-functions.php to the functions.php file in my child theme folder.

    I then edited the copied sf_get_post_details function as follows to get categories to appear in the post meta data.

    REPLACED:

    if ( !$single_author && comments_open() ) {
    $post_details .= ‘<div class=”blog-item-details”><span class=”author”>’ . sprintf( __( ‘By %1$s‘, ‘swiftframework’ ), $post_author, get_author_posts_url( get_the_author_meta( ‘ID’ ) ) ) . ‘</span>’;
    if ( $recent_post ) {
    $post_details .= ‘ / <span>’. $comments .'</span>’;
    }
    $post_details .= ‘</div>’;
    } else if ( $single_author && comments_open() ) {
    $post_details .= ‘<div class=”post-item-details”><span>’. $comments .'</span></div>’;
    } else {
    $post_details .= ‘<span class=”author”>’ . sprintf( __( ‘By %1$s‘, ‘swiftframework’ ), $post_author, get_author_posts_url( get_the_author_meta( ‘ID’ ) ) ) . ‘</span>’;
    }

    WITH:

    if ( !$single_author && comments_open() ) {
    $post_details .= ‘<div class=”blog-item-details”><span class=”author”>’ . sprintf( __( ‘By %1$s‘, ‘swift framework’ ), $post_author, get_author_posts_url( get_the_author_meta( ‘ID’ ) ) ) . ‘ in ‘ . $post_categories . ‘</span>’;
    if ( $recent_post ) {
    $post_details .= ‘<span class=”comments”> / ‘. $comments .'</span>’;
    }
    $post_details .= ‘</div>’;
    } else if ( $single_author && comments_open() ) {
    $post_details .= ‘<div class=”post-item-details”><span>’. $comments .'</span></div>’;
    } else {
    $post_details .= ‘<span class=”author”>’ . sprintf( __( ‘By %1$s‘, ‘swift framework’ ), $post_author, get_author_posts_url( get_the_author_meta( ‘ID’ ) ) ) . ‘ in ‘ . $post_categories . ‘</span>’;
    }

    in reply to: Display categories in post meta section #201940
    flavius
    Member
    Post count: 5

    Hi Kyle,

    I’m comfortable editing theme files. Any chance you could point me in the right direction?

    in reply to: Featured Images disappear on main blog page #201167
    flavius
    Member
    Post count: 5

    Many thanks for your detailed solution which got the featured images working again. However, the images only displayed for regular posts and not gallery, video or audio posts.

    In the end, I managed to get around the problem by adding a function that disables YARPP from loading on the blog page only. Conflict resolved!

    in reply to: Featured Images disappear on main blog page #191531
    flavius
    Member
    Post count: 5

    Hi David,

    Do you have the WRI Related plugin installed on your dev version with no issues?

    I tried the main theme and the problem remains. I also tried disabling all plugins (except WRI Related and Yet Another Related Posts Plugin [https://wordpress.org/plugins/yet-another-related-posts-plugin/]) with no luck.

    I’ve realised that the problem only happens in your theme if I use the Blog shortcode. If I use this shortcode (with the plugins mentioned active), no featured images are show. Other archive and category pages correctly show featured images. The problem seems to be the Blog shortcode.

    Hopefully this helps.

    Regards,

    Richard

    in reply to: Featured Images disappear on main blog page #190701
    flavius
    Member
    Post count: 5
    This reply has been marked as private.
Viewing 5 posts - 1 through 5 (of 5 total)