New Landing How can we help? Cardinal Problem with portfolio titles

Viewing 7 posts - 1 through 7 (of 7 total)
  • Posted in: Cardinal
  • #329243
    ninjatranqui
    Member
    Post count: 70

    Hi, i have created several portfolio items, and named them
    i have tried creating a line break using the “< b r >” tag

    the portfolio shows incoherence in the presentation of the titles, line spacing and line break.

    thank you
    Nuno

    #329418
    ninjatranqui
    Member
    Post count: 70
    This reply has been marked as private.
    #329704
    David Martin – Support
    Moderator
    Post count: 20834

    Hi,

    The line-height does not work from the theme options for the gallery items. Please use this CS to manually adjust it:

    figcaption .thumb-info-excerpt h4 {
        line-height: 38px;
    }
    #329810
    ninjatranqui
    Member
    Post count: 70

    Hi David, the css you provided worked really well, thank you.

    Do you have any solution for the line break? showing up as text?
    (attached image)

    thanks
    Nuno

    Attachments:
    You must be logged in to view attached files.
    #330002
    David Martin – Support
    Moderator
    Post count: 20834

    Great, for security we encode HTML entities, that is why you see a plain text code.

    You can override this. Please install and activate the supplied child theme, inside the child theme functions.php file paste this:

    /* PORTFOLIO RELATED PROJECTS
        ================================================== */
        if ( ! function_exists( 'sf_portfolio_related_projects' ) ) {
            function sf_portfolio_related_projects() {
                global $post, $sf_options;
                $fullwidth  = $sf_options['related_projects_fullwidth'];
                $gutters = false;
                if ( isset($sf_options['related_projects_gutters']) ) {
                $gutters  = $sf_options['related_projects_gutters'];
                }
                $item_count = $sf_options['related_projects_columns'];
                $related    = sf_portfolio_related_posts( $post->ID, $item_count );
                $item_class = "col-sm-4";
                $wrap_class = $heading_class = "";
                if ( $fullwidth ) {
                    $heading_class = "container";
                } else {
                    $wrap_class = "container";
                }
                $hover_style = "default";
                
                if ( $gutters ) {
                    $wrap_class .= " gutters";
                } else {
                    $wrap_class .= " no-gutters";
                }
                
                // Thumb Type
                if ( function_exists( 'sf_get_thumb_type' ) && sf_theme_opts_name() == "sf_atelier_options" ) {
                    $wrap_class .= ' ' . sf_get_thumb_type();
                } else if ( function_exists( 'sf_get_thumb_type' ) && $hover_style == "default" ) {
                    $wrap_class .= ' ' . sf_get_thumb_type();
                } else {
                    $wrap_class .= ' thumbnail-' . $hover_style;
                }
    
                if ( $item_count == "4" ) {
                    $item_class = "col-sm-3";
                }
                if ( sf_theme_supports( 'alt-gallery-hover' ) ) {
                    $item_class .= " portfolio-item gallery-item";
                }
                if ( $related->have_posts() ) {
                    ?>
                    <section class="related-projects <?php echo esc_attr($wrap_class); ?> clearfix">
    
                        <h2 class="<?php echo esc_attr($heading_class); ?>"><?php echo apply_filters('sf_related_projects_heading', __( "Related Projects", "swiftframework" )); ?></h2>
    
                        <div class="row clearfix">
                            <?php while ( $related->have_posts() ): $related->the_post(); ?>
                                <?php
                                $item_title    = get_the_title();
                                $item_subtitle = sf_get_post_meta( $post->ID, 'sf_portfolio_subtitle', true );
                                $thumb_image   = $port_hover_style = $port_hover_text_style = $item_link = "";
                                $thumb_image   = sf_get_post_meta( $post->ID, 'sf_thumbnail_image', true );
                                if ( ! $thumb_image ) {
                                    $thumb_image = get_post_thumbnail_id();
                                }
                                $thumb_img_url = wp_get_attachment_url( $thumb_image, 'full' );
                                if ( $thumb_img_url == "" ) {
                                    $thumb_img_url = "default";
                                }
                                $image                 = sf_aq_resize( $thumb_img_url, 500, 375, true, false );
                                $image_alt             = esc_attr( sf_get_post_meta( $thumb_image, '_wp_attachment_image_alt', true ) );
                                $port_hover_bg_color   = sf_get_post_meta( $post->ID, 'sf_port_hover_bg_color', true );
                                $port_hover_text_color = sf_get_post_meta( $post->ID, 'sf_port_hover_text_color', true );
    
                                $item_link = sf_portfolio_item_link();
    
                                if ( $port_hover_bg_color != "" ) {
                                    if ( isset( $sf_options['overlay_opacity'] ) ) {
                                        $overlay_opacity = $sf_options['overlay_opacity'];
                                        if ( $overlay_opacity == 100 ) {
                                            $overlay_opacity = '1';
                                        } else {
                                            $overlay_opacity = '0.' . $overlay_opacity;
                                        }
                                        $port_hover_bg_rgb = sf_hex2rgb( $port_hover_bg_color );
                                        $port_hover_style  = 'style="background-color:rgba(' . $port_hover_bg_rgb['red'] . ',' . $port_hover_bg_rgb['green'] . ',' . $port_hover_bg_rgb['blue'] . ',' . $overlay_opacity . ');"';
                                    } else if ( isset( $sf_options['overlay_opacity_top'] ) ) {
                                        $overlay_opacity_top   = $sf_options['overlay_opacity_top'];
                                        $overlay_opacity_bottom = $sf_options['overlay_opacity_bottom'];
                                        $port_hover_bg_rgb = sf_hex2rgb( $port_hover_bg_color );
                                        if ( $overlay_opacity_top < 100 || $overlay_opacity_bottom < 100 ) {
                                            $overlay_opacity_top = ($overlay_opacity_top < 100 ? '0.' . $overlay_opacity_top : '1.0');
                                            $overlay_opacity_bottom = ($overlay_opacity_bottom < 100 ? '0.' . $overlay_opacity_bottom : '1.0');
                                            $port_hover_style = 'style="background: -webkit-gradient(linear,left top,left bottom,color-stop(25%,rgba(' . $port_hover_bg_rgb["red"] . ',' . $port_hover_bg_rgb["green"] . ',' . $port_hover_bg_rgb["blue"] . ', ' . $overlay_opacity_top .')),to(rgba(' . $port_hover_bg_rgb["red"] . ',' . $port_hover_bg_rgb["green"] . ',' . $port_hover_bg_rgb["blue"] . ', ' . $overlay_opacity_bottom . ')));
                                                background: -webkit-linear-gradient(top, rgba(' . $port_hover_bg_rgb["red"] . ',' . $port_hover_bg_rgb["green"] . ',' . $port_hover_bg_rgb["blue"] . ', ' . $overlay_opacity_top .') 25%,rgba(' . $port_hover_bg_rgb["red"] . ',' . $port_hover_bg_rgb["green"] . ',' . $port_hover_bg_rgb["blue"] . ', ' . $overlay_opacity_bottom . ') 100%);
                                                background: linear-gradient(to bottom, rgba(' . $port_hover_bg_rgb["red"] . ',' . $port_hover_bg_rgb["green"] . ',' . $port_hover_bg_rgb["blue"] . ', ' . $overlay_opacity_top .') 25%, rgba(' . $port_hover_bg_rgb["red"] . ',' . $port_hover_bg_rgb["green"] . ',' . $port_hover_bg_rgb["blue"] . ', ' . $overlay_opacity_bottom . ') 100%);"';
                                        }
                                        
                                    }
                                }
                                if ( $port_hover_text_color != "" ) {
                                    $port_hover_text_style = 'style="color: ' . $port_hover_text_color . ';"';
                                }
                                ?>
    
                                <article class="<?php echo esc_attr($item_class); ?>">
                                    <figure class="animated-overlay overlay-style">
                                        <img src="<?php echo esc_url($image[0]); ?>" width="<?php echo esc_attr($image[1]); ?>"
                                             height="<?php echo esc_attr($image[2]); ?>" alt="<?php echo esc_attr($image_alt); ?>"/>
                                        <a <?php echo $item_link['config']; ?>></a>
                                        <figcaption <?php echo esc_attr($port_hover_style); ?>>
                                            <div class="thumb-info">
                                                <h4 <?php echo esc_attr($port_hover_text_style); ?>><?php echo $item_title; ?></h4>
                                                <div class="name-divide"></div>
                                                <h5 <?php echo esc_attr($port_hover_text_style); ?>><?php echo $item_subtitle; ?></h5>
                                            </div>
                                        </figcaption>
                                    </figure>
                                </article>
                            <?php endwhile; ?>
                        </div>
    
                    </section>
    
                <?php
                }
            }
    
            add_action( 'sf_portfolio_after_article', 'sf_portfolio_related_projects', 0 );
        }
    #330064
    ninjatranqui
    Member
    Post count: 70

    Ok, thank you
    i’ll have to examine it because i am already editing some things here in the functions php on the child theme, like square thumbnails for instance. So i think it will take a while before i get back to you, thanks
    Nuno

    #330065
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    no problem. Let us know.

    -Rui

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

You must be logged in to reply to this topic.