How to get all existing post types

Thanks to @mmm The solution in this case is pretty simple. Just pass an empty $args array. Then it neglects the default ‘_builtin’ Example $get_post_types = get_post_types( $args = array(), $output, $operator ); return $get_post_types;

Validate a users email address when using gmail to register

Hmm, should try harder before asking for help 🙂 Was quite simple in the end (right or wrong) it works: $domain_array = array(‘googlemail.com’,’gmail.com’); $validemail = is_email($email_to_check); $exists_text=””; if ($validemail): $exists = email_exists($email_to_check); list($user, $domain) = explode(‘@’, $email_to_check); if (!$exists): if (strpos($user, ‘+’)) { list($username_email, $crap) = explode(‘+’, $user); $exists = email_exists($username_email . ‘@’ . $domain); … Read more

Send PDF link in email based on radio button selection

You should use the same name attribute for your 2 radio inputs. So let’s say that name is language. If language is set, you have 2 options represented by value, either English or Chinese. In the code you posted, that is mainly your problem. You set your $radio variable to be $_POST[‘language1’] but $_POST[‘language1’] will … Read more

Overriding a theme redux file in child theme

If you need to add the settings in parent theme created section, just place the below code in child functions.php But remember to replace OPT Name with your_opt_name in “OPT_NAME”.(To find OPT Name just open /parent-theme/includes/options/options-config.php and in top there’s a line $opt_name=”your_opt_name“; ) function add_product_description($sections){ $sections[10][‘fields’][] = array( ‘id’ => ‘product_extra_description’, ‘type’ => ‘multi_text’, … Read more

How to clear WordPress Cache from Server/FTP/Remote location

WordPress has no native page source output caching. In vanilla installation changes to templates should show up immediately. If that doesn’t happen there are several possible reasons: there is static page cache plugin installed, which serves stale version (the specific implementation of cache would depend on a plugin); there is a caching layer between the … Read more

dynamic sidebar not showing anything

In your functions.php file try register sidebar without putting in function like this register_sidebar(array( //try not to enclose this in function ‘id’ => ‘primary’, ‘name’ => ‘Primary Sidebar’, ‘description’ => ‘A short description of the sidebar.’, ‘before_widget’ => ‘<div id=”%1$s” class=”widget %2$s”>’, ‘after_widget’ => ‘</div>’, ‘before_title’ => ‘<h3 class=”widget-title”>’, ‘after_title’ => ‘</h3>’, )); And make … Read more

Unable to post simple form data in HTML

You would never create a create-form.php, doing so would introduce a security problem. For example, lets say your client changed themes, this contact form would still work. Even with the theme deactivated. The same is true of any form handler, AJAX handler, or endpoint for a remote service that directly accesses a PHP file inside … Read more