Support » Plugin: Slick Popup: Contact Form 7 Popup Plugin » Open on click for PHP

  • Resolved Psovpriatel

    (@psovpriatel)


    Hi

    Could anyone help me how to create a link for my button in a php code?

    $enable_right_button = (realfactory_get_option('general', 'enable-header-right-button', 'disable') == 'enable')? true: false;
    			if( $enable_right_button ){
    				$button_link = realfactory_get_option('general', 'header-right-button-link', '');
    				$button_link_target = realfactory_get_option('general', 'header-right-button-link-target', '_self');
    				
    				$logo_right .= '<a class="realfactory-header-right-button" href="' . esc_url($button_link) . '" target="' . esc_attr($button_link_target) . '" >';
    				$logo_right .= realfactory_get_option('general', 'header-right-button-text', '');
    				$logo_right .= '</a>';
    			}
    
    			if( !empty($logo_right) ){
    				echo '<div class="realfactory-logo-right-text realfactory-item-pdlr" >';
    				echo gdlr_core_escape_content($logo_right);
    				echo '</div>';
    			}
    		?>
Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello @psovpriatel

    Use this code and let me know if it works.

    
    $enable_right_button = (realfactory_get_option('general', 'enable-header-right-button', 'disable') == 'enable') ? true : false;
    if ($enable_right_button) {
        $button_link        = realfactory_get_option('general', 'header-right-button-link', '');
        $button_link_target = realfactory_get_option('general', 'header-right-button-link-target', '_self');
        
        //$logo_right .= '<a class="realfactory-header-right-button" href="' . esc_url($button_link) . '" target="' . esc_attr($button_link_target) . '" >';
        $logo_right .= '<a class="realfactory-header-right-button splite-showpopup" href="#">';
        $logo_right .= realfactory_get_option('general', 'header-right-button-text', '');
        $logo_right .= '</a>';
    }
    
    if (!empty($logo_right)) {
        echo '<div class="realfactory-logo-right-text realfactory-item-pdlr" >';
        echo gdlr_core_escape_content($logo_right);
        echo '</div>';
    }
    

    Hi Manish

    Sorry it’s still not working 🙁
    see it here: http://www.scaffoldingcompanylondon.com

    Thanks

    Shouldn’t we need to add link target to this code. Can’t see why it would open it ….

    Hello @psovpriatel
    Please say a Hi at poke@slickpopup.com and we will take it from there.

    Solved

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Open on click for PHP’ is closed to new replies.