Plugin update warning

Not possible unless you plan in advance in your plugin for such a possibility. And even if it was somehow possible you are still not likely to have any user read the message and actually understand it. A more realistic approach is to do a two steps upgrade, in the first vesion of your plugin … Read more

Does functions.php apply to every page?

the if(is_front_page()) will check if front page is being viewed, then load your css and meta slider . Codex documention <?php add_action( ‘wp_enqueue_scripts’, ‘my_theme_enqueue_styles’ ); function my_theme_enqueue_styles() { # added if(is_front_page()) wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/style.css’ ); } add_action( ‘init’, ‘child_theme_init’ ); function child_theme_init() { # added if(is_front_page()) add_action( ‘storefront_before_content’, ‘woa_add_full_slider’, 5); } function woa_add_full_slider() … Read more

How to format PHP if statement? [closed]

Just some slight syntax errors in your formatting. This should help: <?php if ( function_exists( ‘z_taxonomy_image’ ) ) { ?> <img alt=”” src=”https://wordpress.stackexchange.com/questions/236591/<?php if ( function_exists(“z_taxonomy_image_url’ ) ) { echo z_taxonomy_image_url( $child->term_id ); } ?>” /> <?php } else { ?> <img alt=”<?php esc_html( get_the_title() ) ?>” src=”<?php esc_url( get_template_directory_uri() . ‘/assets/images/blank325_170.png’ ) ?>”> <?php … Read more

Add menu to CMS page

Try below code ( with proper modifications if needed ) in your ‘header.php’ <?php if (has_nav_menu(‘primary_navigation’)) : wp_nav_menu([‘theme_location’ => ‘primary_navigation’, ‘menu_class’ => ‘nav’]); endif; ?> For more details try this link

Send email once every 12 months to a particular user [closed]

Set update_user_meta() for a WP_User if get_user_meta() ends up empty. Update a key with a future date for the next year: $startDate=date(‘Y-m-d’); $futureDate=date(‘Y-m-d’, strtotime(‘+1 year’, strtotime($startDate)) ); Schedule an event in one year with wp_schedule_event() or use ‘daily’ to check all users for a relative year date. // WP_User_Query arguments $args = array ( ‘meta_query’ … Read more