Hi,
Its get_the_ID(); ID in uppercase.
In your case you can also the is_shop() condition.
if( is_shop() ){
echo 'shop page';
}
else{
echo 'other pages';
}
Thread Starter
qwain
(@qwain)
Hi,
Thanks for your quick reply.
It used get_the_ID() (ID in uppercase) but that did not work.
Since get_the_ID() was not working, I’ll thought it was outside the loop and used:
global $wp_query;
$post_id = $post->ID;
But als without any result. get_the_permalink(), get_the_title, etc. is not working
within xoo-wsc-content.php also.
I tried is_shop() and that is not working also.
You can check it out on https://trimsalonsnuit.nl/canivera-producten-bestellen/, if you like.
I am totally lost….
Thanks, Fred
Just tested on my site.
All cases are working fine.
Are you directly making the changes to plugin file or overriding template file?
Try deactivating other plugins.
Thread Starter
qwain
(@qwain)
I made the changes directly to the plugin file bij adding these lines:
global $wp_query;
$post_id = $post->ID;
to the file xoo-wsc-content.php from public/partials.
If you like I can send you the file for your reference.
(by the way, tried it also without any plugin active besides WooCommerce)
Thread Starter
qwain
(@qwain)
By the way, I’ve translated the complete .pot file to Dutch. If you like I can send you the .mo and .po files….