done !… I explain it if can help!
With a shortcut function from here. Thanks to Neil.
I place this function in my functions.php
add_shortcode ('geturl', 'get_current_page_url');
function get_current_page_url() {
$pageURL = 'http';
if( isset($_SERVER["HTTPS"]) ) {
if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
}
$pageURL .= "://";
if ($_SERVER["SERVER_PORT"] != "80") {
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
} else {
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
}
return $pageURL;
}
And them, I just add this to a text widget
<p><a target="_blank" href="[geturl]?wpp_export=print"><img src="https://.....">?? Print</a></p>
After it I just hide the “oficial print button” with css.
and that works fine for me.
Hope this can help.