Thank you very much, Meitar! I will try to work with this info
Hi, Happy New Year!
I tried to make as you advised in your links above. And it’s not working for me. I think I miss something, but after hours and hours, I couldn’t find what exactly. It just doesn’t load a data. I have an empty table.
I would be very happy if you could have a look and recommend me something.
I made a plugin with a following code:
————————–
<?php
/*
Plugin Name: Find Current Page URL
Version: 0.1
*/
function filter_gdoc_query ($query, $atts) {
if (‘https://docs.google.com/spreadsheets/mysheet_address’ !== $atts[‘key’]) { return $query; }
$page_code = wp_get_current_apge_code();
return str_replace(‘__PROGRAM_CODE__’, $page_code, $query);
/*echo ‘result url: ‘ . $page_code;*/
};
function wp_get_current_apge_code(){
$url = str_replace(‘/’, ”, $_SERVER[‘REQUEST_URI’]);
/*echo ‘result url: ‘ . $url;*/
};
add_filter(‘gdoc_query’, ‘filter_gdoc_query’, 10, 2);
—————————
where __PROGRAM_CODE__ is a URL path of the page
The plugin shortcode is following:
[gdoc key=”https://docs.google.com/spreadsheets/mysheet_address” class=”GoogleInfo1 no-datatables” use_cache=”no” query=”select J where C = ‘__PROGRAM_CODE__’ “]
Thank you very much!
Plugin Author
Meitar
(@meitar)
This is a request for custom code. I do not provide such support on this forum. You need to learn more about PHP or hire someone to do it for you. Good luck.
Ok, thank you. Is any way I can get support (maybe not on this forum)?