Auto create pages on WordPress multi site register

Not sure about multisite, however it usually works similarly to single site, so the following info may be useful: There is a pluggable function (ie you write your own which will run instead of wp’s function) “wp_install_defaults” Put your function in a ‘dropin’ plugin for install.php and wp will use your function to create defaults … Read more

How to create a dynamic page based on form data with a plugin?

Something like this should work, though I’m not sure how meta, title, etc.. will behave, you’ll want to test everything thoroughly! function my_template_redirect() { global $wp; $qvs = $wp->query_vars; if (array_key_exists( ‘laundry’, $qvs && $qvs[‘laundry’] == ‘thank-you’ ) { global $wp_query; $wp_query->set( ‘is_404’, false ); // … now what? $post = new stdClass(); $post->ID= -99; … Read more

Remove child products from woocommerce category page [closed]

you want to display only parent category products and remove the child category products. Add the following lines of code at the end of your theme’s functions.php file. function exclude_product_cat_children( $wp_query ) { if ( isset( $wp_query->query_vars[‘product_cat’] ) && $wp_query->is_main_query() ) { $wp_query->set( ‘tax_query’, array( array ( ‘taxonomy’ => ‘product_cat’, ‘field’ => ‘slug’, ‘terms’ => … Read more

Create a full width responsive header image per page

John there are lots of ways to do this, depending on what you want exactly and how much experience you have with html/php/css (or how much time you’d want to spend learning). There are plenty of plugins on wordpress that could achieve this. You might want to just try some of them out: https://wordpress.org/plugins/search.php?q=custom+header If … Read more

Change WordPress post-state in Admin Area

Your function doesn’t return a value, so you are effectively wiping the existing states. Also, this hook passes you the current post as an object, so you can use that instead of the global $post. Additionally get_page_templ‌​ate_slug returns a path that is relative to your theme’s root, so if your theme directory is called Lef-en-Liefde … Read more

How to create user personal pages with information from their meta profile fields?

First of all register the cpt. Probably if you don’t want add the UI for that post type you can set the show_ui to false. $args = array( ‘label’ => ‘Members’, ‘public’ => true, ‘exclude_from_search’ => true, ‘show_ui’ => false, ‘show_in_nav_menus’ => false, ‘show_in_menu’ => false, ‘show_in_admin_bar’ => false, ‘hierarchical’ => false, ‘has_archive’ => true, … Read more