Tag Info

New answers tagged

0

Another different approach is just adding a hidden input field to the form: <input type="hidden" name="page" value="your-page-slug" /> This way, WordPress seems to handle the redirect automatically.


1

Hooks are going to be your best friend here. You can filter post content by using the the_content filter for example: add_filter('the_content', 'wse_174099_append_to_content'); function wse_174099_append_to_content( $content ) { //get your data $custom_items = get_option( 'option_name' ); $content .= wpautop( $custom_items ); //always ...


0

Another way is to set a global wp_option when the work is done and check for that option every time the init hook is executed. function my_one_time_function() { // Exit if the work has already been done. if ( get_option( 'my_one_time_function', '0' ) == '1' ) { return; } /***** DO YOUR ONE TIME WORK *****/ // Add or update the ...



Top 50 recent answers are included