Path for contact form file

You could put both the form and processing logic in the same file and submit the form to the same page by omitting the action attribute. Check $_POST vars to see if the form has been submitted and do your processing, otherwise display the form. if( isset( $_POST[‘somevar’] ) ) : // process submission else … Read more

Add read more to the_content

You could add a link manually like: <a href=”https://wordpress.stackexchange.com/questions/88976/<?php echo get_permalink($post->ID) ?>”>Read More…</a> If you want to add the link at the end of the content you could do: return implode(‘ ‘, array_slice($words, 0, $word_limit)) . ‘<a href=”‘.get_permalink($post->ID).'”>Read More…</a>’;

Option to feature custom post type on home page

First, you’ll want a quick way to toggle whether a post is featured or not. I wrote a plugin that does this: http://wordpress.org/extend/plugins/featured-item-metabox/ but I feel like a total dork because I just discovered that this plugin was already doing that! http://wordpress.org/extend/plugins/featured-post Ugh. Anyway, how you want to feature them on the home page will … Read more

learn to run wpdb class

Arbitrary SQL query can be run via wpdb by using get_results() method: $results = $wpdb->get_results( $query ); You can work through documentation for wpdb at Codex to gain basic understanding of how it works.

WordPress options text format

WordPress does not automatically texturize options. If you are using add_option(), update_option(), and/or get_option() then it should “just work”. Example: //Add an option to the database update_option(‘my_test_option’,’This is an option. Isn\’t it “special”?’); //Returns string: This is an option. Isn’t it “special”? echo get_option(‘my_test_option’);