Putting a wordpress custom post into a widget

You will need a “form” and an “update” method for your widget class. function form($instance) { $instance = wp_parse_args( (array) $instance, array (‘show’) ); $show = (!empty($instance[‘show’])) ? $instance[‘show’] : ”; echo ‘<input type=”text” name=”‘.$this->get_field_name(‘show’).'” value=”‘.esc_attr($show).'” />’; } function update($new_instance, $old_instance) { $instance = $old_instance; $instance[‘show’] = ($new_instance[‘show’]) ? $new_instance[‘show’] : 1; return $instance; } … Read more

Use domain with existing WordPress install

The easiest way to handle this is to let your domain point to the WordPress directory, in your case: /mysite from your root web folder. This usually can be done either by your hoster or in your cPanel/administration tools. You also have to change WordPress Url and Site Url in your WordPress Settings to your … Read more

Using WordPress as a Mobile App Backend

You could use WP and all it’s associated goodness for a mobile app backend (I’m going to do it soon myself). Custom post types are not a problem. Make a page, grab the data with a WP_Query and serve up the query results as JSON instead of HTML, though you’ll have to do this bit … Read more

get_permalink to attachment not working

The Problem is that you query for Post Status null. Try setting this to publish or inherit, because get_permalink is a function for published items, not for any post status. This is because Permalinks to items with a status like draft should not be shown to the user.

Some images suddenly not appearing

I had a look at your links, looks like you are using Jetpack which puts all your images on the WordPress CDN. For some reason it is not working correctly. Turn it off and it shall work properly. Most likely you must have changed the image after publishing the post