• Resolved Li-An

    (@li-an)


    Hello, my theme Simplemag uses Redux Framework for homepage. WP Typography breaks completely URL put in fields related to images inserted via Redux. I did not find how to fix this – see last clickable image on my homepage before footer.

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author pepe

    (@pputzer)

    @li-an: Sorry for not replying earlier – it looks like I’m not getting any mails from WP.org at the moment.

    Regarding the framework, there is probably malformed HTML being passed to the filters somewhere. You could try changing the “Parser Errors” setting to stop ignoring parser errors (this will return to original string if one of wp-Typography’s filter functions is passed malformed HTML code).

    Plugin Author pepe

    (@pputzer)

    @li-an: BTW, are you talking about the image beneath “Soutenez ce site”? In what way is the URL “broken”?

    Thread Starter Li-An

    (@li-an)

    No, the big one under “Voir Actualité BD”. When I right click/copy the link in Notepad++, it’s changed in

    https://www.li-an.fr/%E2%80%8Bb%E2%80%8Bl%E2%80%8Bo%E2%80%8Bg%E2%80%8B/%E2%80%8Bj%E2%80%8Be%E2%80%8Bs%E2%80%8Bu%E2%80%8Bs%E2%80%8B-%E2%80%8Bb%E2%80%8Bd%E2%80%8B-%E2%80%8Bb%E2%80%8Ba%E2%80%8By%E2%80%8Ba%E2%80%8Br%E2%80%8Bd%E2%80%8B-%E2%80%8Bj%E2%80%8Be%E2%80%8Bu%E2%80%8Bn%E2%80%8Be%E2%80%8Bs%E2%80%8Bse/

    When I desactivate WP Typo, it works normally.

    • This reply was modified 8 years, 3 months ago by Li-An.
    Plugin Author pepe

    (@pputzer)

    Ah, I was looking at the wrong URL/image.

    You should have look at your theme’s templates, namely how this part of the page is generated exactly (which functions etc.). Is that some kind of custom field containing the URL?

    Thread Starter Li-An

    (@li-an)

    Sorry, it was under “Voir Actualité BD” but it seems you found it.
    Here is the code of one of the problematic component

    <?php 
    /**
     * Full Width Image
     * Page Composer Section
     *
     * @package SimpleMag
     * @since 	SimpleMag 3.0
    **/
    
    /**
     * Get image and it's ID and pass it as a class
    **/
    $get_image_bg = get_sub_field( 'full_image_upload' );
    if ( ! empty( $get_image_bg ) ) {
        $image_bg = sanitize_html_class( 'image-' . $get_image_bg['id'] );
    }
    
    /**
     * Section styling based on field selection:
     * White, Black or Tint
    **/
    $section_style = get_sub_field( 'full_image_style' );
    
    if ( $section_style == 'image_bg_white' ) :
        $section_style_class = 'content-over-image-white';
    elseif ( $section_style == 'image_bg_black' ) :
         $section_style_class = 'content-over-image-black';
    else :
        $section_style_class = 'content-over-image-tint';
    endif;
    
    $section_style = sanitize_html_class( $section_style_class );
    
    /**
     * Get the button URL
    **/
    $button_url = get_sub_field( 'full_image_button_url' );
    
    /**
     * Main & Sub titles
    **/
    $main_title = get_sub_field( 'full_image_main_title' );
    $sub_title = get_sub_field( 'full_image_sub_title' );
    ?>
    
    <section class="home-section full-width-section title-with-bg full-width-image <?php echo ( isset ( $image_bg ) ? $image_bg : '' ) . ' ' . $section_style; ?>">
        <div class="entry-header">
            <div class="inner">
                <div class="inner-cell">
                    <div class="entry-frame">
            
                    <?php if ( ! empty( $button_url ) ) { ?>
                        <h2 class="title"><a href="<?php echo esc_url( $button_url ); ?>"><?php echo esc_html( $main_title ); ?></a></h2>
                    <?php } else { ?>
                        <h2 class="title"><?php echo esc_html( $main_title ); ?></h2>
                    <?php } ?>
    
                    <?php if( $sub_title ): ?>
                    <span class="sub-title"><?php echo esc_html( $sub_title ); ?></span>
                    <?php endif; ?>
    
                    <?php 
                    // Button
                    $button_text = get_sub_field( 'full_image_button_text' );
    
                    if ( ! empty( $button_text ) ) {
                        echo '<a class="read-more" href="' . esc_url( $button_url ) . '">' . esc_html( $button_text ) .'</a>';
                    }
                    ?>
    
                    </div>
                    
                </div>
            </div>
    
        </div>
    </section><!-- Full Width Image -->
    Plugin Author pepe

    (@pputzer)

    I don’t think that’s the right template. The <section> element contains these classes on your page: wrapper home-section advertising.

    Thread Starter Li-An

    (@li-an)

    Sorry.

    <section class="wrapper home-section advertising">
    <?php
    $image = get_sub_field( 'ad_banner_url' );
    $image_link = get_sub_field( 'ad_banner_link' );
    
    // Output the image
    if ( !empty( $image ) ) {
    	if (  !empty( $image_link ) ) {
    		if ( get_sub_field( 'static_image_mode' ) == 'static_image_banner' ) {
    			$new_window = 'target="_blank"'; 
    		} else {
    			$new_window = '';
    		}
    		echo '<a href="' . esc_url( $image_link ) . '"' . $new_window . '>';
    	}
    	echo '<figure class="base-image">
    	<img src="' . esc_url( $image['url'] ) . '" alt="' . esc_attr( $image['alt'] ) . '" width="' . esc_attr( $image['width'] ) . '" height="' . esc_attr( $image['height'] ) . '" />';
    	if ( $image['caption'] ) {
    		echo '<span class="icon"></span><figcaption class="image-caption">' . $image['caption'] . '</figcaption>';
    	}
    	echo '</figure>';
    	if (  !empty( $image_link ) ) { echo '</a>'; }
    }
    ?>

    I hope this one is the good one.

    Plugin Author pepe

    (@pputzer)

    Since there is a reference to get_sub_field, is the framework or your theme using ACF? If so, you can disable the integration (filtering) via the wp-Typography Disable ACF Integration plugin.

    Thread Starter Li-An

    (@li-an)

    OK, your extension fixes the problem. I did not know that the theme used ACF (it is not installed).

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Interaction with Redux Framework’ is closed to new replies.