Secondary navigation menu on one page

If you need this menu on one page only, let’s say About Us (slug: about-us), you can easily add a conditional like this in pages.php at the place where you want the menu to appear: if (is_page(‘about-us’)) { wp_nav_menu( array( ‘theme_location’ => ‘secondary-menu’, ‘menu_class’ => ‘secondary’, ‘fallback_cb’ => ” )); } Remember that if you … Read more

Upload file could not be moved to wp-content/uploads

I experienced this error while preparing an AWS ec2 Bitnami micro-instance configured for WordPress. This approach requires the command-line, so please launch a terminal-session and begin via SSH into the deployed production. cd into the application document-root: /home/bitnami/apps/wordpress/htdocs: Execute the below command to identify the Apache web-server: ps aux | egrep ‘(apache|httpd)’ Revealing daemon in … Read more

How to get the value of input hidden html from text editor to custom page template?

If you’re not specifying a page, then you would access the $_POST data on the same page as your form. print_r( $_POST ); if ( isset( $_POST[ ‘firstname’ ] ) ) { echo $_POST[ ‘firstname’ ] . ‘ ‘ . $_POST[ ‘lastname’ ]; wp_die(); } else { ?> <form method=”POST”> First name:<br> <input type=”text” name=”firstname” … Read more

Input data from email form not going to JSON file

I have checked the code. file_put_contents function accepts the absolute path for the file. Use the ‘get_template_directory()’ function for the absolute path. Please check the updated code. <form method=”get”><p id=”myform”><input type=”email” name=”EMAIL” placeholder=”enter email address” required /> <input id=”submit” name=”submit” type=”submit” value=”Sign up” /></p></form> if (isset($_POST[‘submit’])) { $file = get_template_directory() . ‘/data.json’; $json_string = json_encode($_POST, … Read more