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.