Replace “content-area” of themes 404 page with plugin?

According to the Template Page hierarchy, https://developer.wordpress.org/files/2014/10/wp-hierarchy.png the only template page WP will load is 404.php But, you might try this in your mu-plugins: //Some function to check database to see if this URL should exist if ( ! checkIfPageExists( $_SERVER[‘REQUEST_URI’] ) ) { //Set 404 Status status_header( “404” ); get_header(); //do your custom 404 … Read more

Not displaying Woocommerce product page in lightbox

you are adding the name of product in a’s tag of href <a class=”modal-link” href=”https://wordpress.stackexchange.com/product/” . $wslug . ‘”/>View</a> you need to add products html link in this like below <a class=”modal-link” href=”https://wordpress.stackexchange.com/questions/312841/example.html”/>View</a> i hope it work. lightbox link ex: <a href=”http://www.yoursite.com/yourpage.htm” class=”html5lightbox” data-width=”960″ data-height=”600″>Link to Page</a>

Having issue on Loading Meta Data From CSV to CPT

Your metas need to be passed to wp_insert_post() as an array like so: // Insert the post into the database $post[“id”] = wp_insert_post( array( “post_title” => $post[“title”], “post_type” => $cpt[“custom-post-type”], “meta_input” => array( “custom-field-1” =>$cpt[“custom-field-1”], “custom-field-2” =>$cpt[“custom-field-2”], ) “post_status” => “publish” )); https://developer.wordpress.org/reference/functions/wp_insert_post/#parameters

How to save the option’s new values plus old value without overwrite old one

You are misspelling the variables names. You define them as $new_value and $old_value with underscore that you forgot about. Except this your code working fine. function myplugin_update_field_foo( $new_value, $old_value ) { if ($new_value !== $old_value && is_array($old_value) && is_array($new_value)) { $new_value = array_unique( array_merge( $new_value, $old_value ) ); } return $new_value; } To get the … Read more

Yoast and another plugin

Yoast only looks at the_content – that is, the content in the main, default WP editor. If your other plugin stores the content of posts in any other way, Yoast won’t see that content. You’ll probably be best off just disabling content analysis in Yoast if you’d like to continue using that plugin. Or, you … Read more