Contact form do not find submit.php file

Just from what you described it seems as if your <form> tag looks more or less like this: <form method=’post’ action=’submit.php’> Try replacing it with: <form method=’post’ action=’http://www.mydomain.com/submit.php’>

Adding a new layout for genesis

I have attempted answering my own question with the following code: // Added to layout.php in /genesis/lib/structure.php add_action(‘genesis_before’, ‘modalwindow_layout_logic’); function modalwindow_layout_logic() { $site_layout = genesis_site_layout(); if ( $site_layout == ‘modalwindow’ ) { // Remove default genesis sidebars remove_action( ‘genesis_after_content’, ‘genesis_get_sidebar’ ); remove_action( ‘genesis_after_content_sidebar_wrap’, ‘genesis_get_sidebar_alt’); remove_action( ‘genesis_footer’, ‘genesis_do_footer’ ); remove_action( ‘genesis_header’, ‘genesis_do_header’ ); // Remove layout … Read more

How to define category ID in an array?

As Geert pointed out, your current conditional will always be true. An if() construct needs to be fed an expression. You’re feeding it a valid array, so that’s true. Always. So far this is basic PHP, regardless of whether in a WP environment or not. As can be read in Chris_O’s comment if ( is_category(‘some-cat’) … Read more

How can I json_encode the output of my function?

Not sure if the get_all_images() function is the one that is added to your wp_ajax_{action} hook. If it is you will want to output a string back to your js. I would define a variable and concatenate the img html to it as you loop through your images. function get_all_images() { //your code $response=””; foreach($images … Read more

Is it possible to control content on different pages by checkboxing wich content is shown where on a wordpress theme page?

You can use the WordPress Settings API to do what you’re looking for. You can follow this – WordPress Settings API Tutorial ( www.ottopress.com ) to setup an options page, and depending upon the options saved in database you can show different content. Example – <?php // get the stored value in variable – foo … Read more