Installing WP on localhost

Generally you should only configure WP for localhost if you have physical possession of the computer/server. You cannot access localhost of a remote computer. Well there are tricks that this is beyond the scope of this discussion. Edited to add To install WP on localhost, after installing the WP files, go to: http://localhost/ or if … Read more

How can I get a comment ID on Submit?

You can hook comment_post and add your logic with the comment id // Save the data along with comment id add_action( ‘comment_post’, ‘wti_save_comment_data’ ); function wti_save_comment_data( $comment_id ) { // Use the comment id and add your logic }

Why do all Gallery functions return null for me?

Okay, looks like it was my fault, I’ve been playing with shortcodes long time ago and I found out something like this within functions.php: require_once (‘gallery-shortcode.php’); Apparently it replaced the original shortcode and when it happens everything gallery-related breaks / returns nothing 🙂

custom post type for custom talbe

I’m not sure I understand your question, but I think you’re asking how do you create a post from a form thats submitted by a user? These tutorials might help: http://wp.tutsplus.com/tutorials/allow-users-to-submit-images-your-site/ or http://wp.tutsplus.com/tutorials/allow-users-to-submit-to-your-wordpress-site-a-quotes-plugin/ It shows how to create post from a forms input. For the conditional part, if you want them to be logged in … Read more

Change get_post_thumb responsively?

You can do this by using conditionals for mobile ie: wp_is_mobile() Define both the sizes like add_image_size( ‘featured-cat’, 248, 110, true ); //featured-cat add_image_size( ‘featured-cat-mobile’, 200, 80, true ); //featured-cat mobile and edit the code like the below:– <?php echo ‘<div class=”featured-thumbnail”>’; if( wp_is_mobile() ) the_post_thumbnail(‘featured-cat-mobile’,array(‘title’ => ”)); else the_post_thumbnail(‘featured-cat’,array(‘title’ => ”)); echo ‘</div>’; ?>