Tweetily – Adding Custom Post Types

If you would like to add custom post types to be tweeted by the plugin,  ( then follow the steps below.

1. Open top-core.php
2. Find lines +- 95

` $sql = “SELECT ID
FROM $wpdb->posts
WHERE $pt post_status = ‘publish’

3. From the Admin Page of Tweetily, choose ALL (Both pages and posts)

4. Modify the above line as follows (use your values)
$sql = “SELECT ID
FROM $wpdb->posts
WHERE $pt post_status = ‘publish’
AND($wpdb->posts.post_type = ‘CUSTOM_POST_TYPE-1’
OR $wpdb->posts.post_type = ‘CUSTOM_POST_TYPE-2’
OR $wpdb->posts.post_type = ‘posts’
OR $wpdb->posts.post_type = ‘pages’) “;

If you want to take out posts/pages/ just comment out the code or remove.

TIP: Save a copy of this file, incase the plugin is updated then you can do a diff on the two and make the necessary changes again.

5. Do a Test Tweet and reload your page.


Please let me know if this worked for you.

WordPress Podpress Plugin – Update File Urls

Use at your own discretion! In short, if you ever wanted to move your media files in wordpress to another domain or something, you can use this code via functions.php to do the job.

prefix."postmeta as pod WHERE pod.meta_key = '_podPressMedia'";
$podpressmetadata = $wpdb->get_results($query_string, ARRAY_A);
if ( TRUE === is_array($podpressmetadata) AND FALSE === empty($podpressmetadata) ) {
for ($i=0; $i < count($podpressmetadata); $i++) {
$data_ar = unserialize($podpressmetadata[$i]['meta_value']);
if ( TRUE === is_array($data_ar) AND FALSE === empty($data_ar) ) {
for ($j=0; $j update( $wpdb->prefix.'postmeta', array('meta_value' => $podpressmetadata[$i]['meta_value']), array('meta_id' => $podpressmetadata[$i]['meta_id']), array('%s'), array('%d') );
register_activation_hook( __FILE__, array('podPress_Location_URL_update', 'update_urls') );