For downloadable product I use redirect option to .html file which uses php script to get 4 digit access code that is generated as file and downloaded automatically. Link below:
https://www.tehosportareena.fi/wp-content/uploads/kulkukoodi/kulkukoodi.html
I already tried completely removing Woocommerce from wordpress with adding the define( ‘WC_REMOVE_ALL_DATA’, true ); line to wp-config.php file but that did not help.
Is this a bug or is this something else? Is it possible to make this work?
]]>I was wondering if I can generate an automatic link to my newest page either based on template 1 or 2.
So far I have used this code to get the newest page with a certain template:
<?php
$args = array(
'meta_key' => '_wp_page_template',
'meta_value' => 'page-frontpage.php',
'number' => 1,
'sort_column' => 'post_date',
'sort_order' => 'DESC',
);
$fp = get_pages($args); //last page with template 'frontpage'
$fp_id = $fp[0] -> ID; //has Id of the last frontpage
?>
<a class="fp-link" href="<?php echo get_page_link($fp_id); ?>" title="Frontpage">FRONTPAGE</a>
Now a new template was created, and I want to generate a link to the newest page of both templates together.
Is there a possibility?
Thanks for your help.
Cheers
]]>