Hi,
thanks for your post, and sorry for the trouble.
{Keyword} is not a valid Shortcode in the sense of the WordPress Shortcode API, but apparently a custom implementation by that plugin. Therefore, we’ll need a bit of extra code to make these work. Unfortunately, as this seems to be a premium plugin, I can’t access the source code to find that code. You’d therefore please have to ask the developer for the function name that needs to be run on content to evaluate these keywords.
Regards,
Tobias
Thank you so much for you quick response.
Actually there is a free version if you want to check it out https://es.ww.wp.xz.cn/plugins/page-generator/
Anyway I’m going to ask the developer about the function name and let you know.
Cheers
Hi,
I had a quick look at the code of the free version, but couldn’t immediately find the function, as my time is limited at the moment.
It would be best if their support team can provide this.
Regards,
Tobias
Hi Tobias,
I asked the developer and he replied this:
I can’t provide specifics on how they might want to implement a solution, as it will depend on their software. However, they’ll most likely want to force processing of their shortcodes using the page_generator_pro_generate_post_args filter, which fires prior to the creation of the generated Page:
https://www.wpzinc.com/documentation/page-generator-pro/developers/#page_generator_pro_generate_post_args
I hope it helps, let me know if I have to ask him anything else
Thank you for your time and patience
Hi,
hhm, no, I don’t see how that solves our problem.
What we need is the PHP function that searches for {keyword} in content.
For example, WordPress normally uses
add_filter( 'the_content', 'do_shortcode' );
to replace WordPress Shortcodes with the corresponding content in posts and pages.
TablePress uses a similar code like
add_filter( 'tablepress_cell_content', 'do_shortcode' );
to search for such Shortcodes in table cells.
What we now need is their function equivalent to that do_shortcode PHP function. Its task is to search for things like {keyword} and replace it with the correct content at that time.
Regards,
Tobias