Plugin Support
sr293
(@sr293)
Hello @jameswithsupersonic if you would like to have Simply Static automatically generate an export after a post or page has been published you could try using the following filter, which will trigger a single page export:
add_filter( ‘ssp_single_auto_export’,’__return_true’ );
Below is a link to more code snippets that may be of help: https://simplystatic.com/docs/code-snippets/
Hi @sr293
Base on some source found on the forum we actually have this code below in the theme function.php.
We are integrating generate static with Oasis workflow, what we want to do is on the workflow complete which the hook they provided ‘owf_workflow_complete’ it will trigger to generate all the static files but somehow somewhere along the way this code no longer works? we are not sure what is the cause or is there a better solution?
I tried this by adding it into function.php add_filter( ‘ssp_single_auto_export’,’__return_true’ ); ran the workflow complete doesnt seems to generate too
add_action(‘owf_workflow_complete’, ‘generate_static’);
function generate_static(){
$simply_static = Simply_Static\Plugin::instance();
$simply_static->run_static_export();
}