Notify admin (by email) if post added with specific tag

Here is some simple code provided straight out of the WordPress codex. If you are not familiar with the Codex, you should make time to do so. https://codex.wordpress.org/Plugin_API/Action_Reference/save_post function my_project_updated_send_email( $post_id ) { // If this is just a revision, don’t send the email. if ( wp_is_post_revision( $post_id ) ) return; // get the post … Read more

Form direction to .php on localhost

You may want to make sure you are creating a brand new page template for this. http://www.wpbeginner.com/wp-themes/how-to-create-a-custom-page-in-wordpress/ Sve the template in your Child Theme folder In this template, place you form code where you want it to display. In the tag, change it to this: <form id=”quiz” method=”post”> Also, you should add your grade.php code … Read more

How do I correct this filecount?

You’re right – this is very much a generic PHP question. But fwiw, the issue is that you clearly want to count all JPEG files, but your sample code counts all files – so… while ( false !== $f = $d->read() ) { if ( in_array( strtolower( pathinfo( $f, PATHINFO_EXTENSION ) ), [ ‘jpg’, ‘jpeg’ … Read more

My function echos only “array”

You shouldn’t return childpages, you should add variable $ret=””; and in each cycle append foreach(…){ $ret.=”<div…”; } and return it In general you should always return a string(or number) in such functions

index.php navigation

I think you should use wp_link_pages function, it’s was built for that purpose. $defaults = array( ‘before’ => ‘<p>’ . __( ‘Pages:’ ), ‘after’ => ‘</p>’, ‘link_before’ => ”, ‘link_after’ => ”, ‘next_or_number’ => ‘number’, ‘separator’ => ‘ ‘, ‘nextpagelink’ => __( ‘Next page’ ), ‘previouspagelink’ => __( ‘Previous page’ ), ‘pagelink’ => ‘%’, ‘echo’ … Read more