• Resolved tradesouthwest

    (@tradesouthwestgmailcom)


    Is there any way to creat an option for Display Popover On (Page x) id maybe. I am good enough with PHP to insert a post_id if this is all it needs.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support cornershop

    (@cornershop)

    Hi there!

    Thanks so much for sharing. This is actually something that’s on our radar and being considered for a future release of Smart Overlay, so stay tuned. ??

    Thread Starter tradesouthwest

    (@tradesouthwestgmailcom)

    Thanks for getting back.
    Ended up doing this:

    
    <div class="disclaimer-box">
    <div class="disclaimer-links">
    <p class="disclaimer-middle"><a id="unCook" class="et_pb_promo_button et_pb_button" href="javascript: void();" onclick="goBack();">Decline</a> 
    <span class="disclaimer-right">
    <button id="refit" class="smart-overlay-close et_pb_promo_button et_pb_button" style=""position:relative;">
    <span class="text-white">Accept</span></button></span></p>
    
    </div>
    </div>

    and:

    function orbisius_divi_child_theme_smart_goBack() {
    	if( is_page( 'download-archive' ) ) { 
    		$gbk = '';
    		$gbk .= '<script type="text/javascript">function goBack() { window.history.go(-1); }</script>';
    	echo $gbk;
    	}
    } 
    add_action( 'wp_footer', 'orbisius_divi_child_theme_smart_goBack' );
    

    in short I just used is_page and then the slug and made a body class for the page, but your plugin would only need to enter page id or slug but default to is_page() with no slug or id.

    Hope this helps

    • This reply was modified 6 years, 8 months ago by tradesouthwest. Reason: made cleeaner for viewing
    • This reply was modified 6 years, 8 months ago by tradesouthwest.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Popover only on single page’ is closed to new replies.