Can you help with the code
-
Hello, I wanted to write a code so that, after importing, it automatically selects the shop page, I did not succeed, can you help how what needs to be changed in this code to make it work.
function ocdi_after_import_setup() { // Assign front page and posts page (blog page). $front_page_id = get_page_by_title( 'Home' ); $blog_page_id = get_page_by_title( 'Blog' ); update_option( 'show_on_front', 'page' ); update_option( 'page_on_front', $front_page_id->ID ); update_option( 'page_for_posts', $blog_page_id->ID ); } add_action( 'ocdi/after_import', 'ocdi_after_import_setup' );
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Can you help with the code’ is closed to new replies.