Custom theme, contact form 7 & fast secure form doesn’t work

I found the solution myself, It had something to do with my code echoing out $content = $page->post_content … echo $content;… I changed this to $content = apply_filters(‘the_content’, $page->post_content); … echo $content;… And now it works! Ref: https://stackoverflow.com/questions/6405974/using-get-pages-in-wordpress-is-stripping-out-my-p-tags

My jQuery is enqueued properly. So why isn’t it working?

jQuery scripts in WordPress require no-conflict wrappers. Instead of this: $(document).ready(function(){ $(#somefunction) … }); Use this: jQuery(document).ready(function($) { // $() will work as an alias for jQuery() inside of this function }); So, in your case: jQuery(document).ready(function($) { $(“#openbtn”).click(function(){ $(“#openingtimes”).toggle(300); }); });

Does the textdomain have to be the theme’s name?

The text domain is a unique identifier, which makes sure WordPress can distinguish between all loaded translations so Using the basename of your plugin/theme is always a good choice because plugin/theme basename is always unique though it is not mandatory to have plugin/theme basename as text domain, you can use any unique identifier. If you’re … Read more

Custom post type isn’t working

One problem is that your ‘capability_type’ parameter ‘community’ doesn’t match your ‘capabilities’ array values. From the Codex: capability_type (string or array) (optional) The string to use to build the read, edit, and delete capabilities. May be passed as an array to allow for alternative plurals when using this argument as a base to construct the … Read more

Using page-id-{ID} from body_class() in local dev, versus live staging

You could use slugs instead of IDs. Taken from the Starkers theme (add it to your functions.php): add_filter( ‘body_class’, ‘add_slug_to_body_class’ ); function add_slug_to_body_class( $classes ) { global $post; if( is_home() ) { $key = array_search( ‘blog’, $classes ); if($key > -1) { unset( $classes[$key] ); }; } elseif( is_page() ) { $classes[] = sanitize_html_class( $post->post_name … Read more