Redirecting URL with Twitter Button API Not Working
Well, you’re missing several of the data bits. Notably, data-text and data-url. See here for the parts of the tweet button code you should be including: https://dev.twitter.com/docs/tweet-button
Well, you’re missing several of the data bits. Notably, data-text and data-url. See here for the parts of the tweet button code you should be including: https://dev.twitter.com/docs/tweet-button
My first suggestion is to output a WXR formatted file from phpNuke if possible. I’m not familiar with it, however I’m pretty sure it’s possible on any platform with database access. If you aren’t familiar with WXR, install a sandbox WP environment, create a few posts, categorize them, create and assign parent pages, upload image … Read more
You can just update your function to pass the post_id as a parameter. function w_thumbnail_src($post_id) { if (has_post_thumbnail($post_id)) { $thumb = wp_get_attachment_image_src(get_post_thumbnail_id($post_id), ’emphasis’); echo $thumb[0]; // thumbnail url } }
You might check out a plugin like this one. If you don’t want to go that route, I’d suggest using a page template and a technique like this to list out the files. Lastly, assuming you’re using apache, you could set apache to allow listing directory contents (not the best idea, IMO) and then edit … Read more
Showing links to attachments in the desired format Loop through the attachments and generate the link you want: $args = array( ‘post_type’ => ‘attachment’, ‘numberposts’ => null, ‘post_status’ => null, ‘post_parent’ => $post->ID ); $attachments = get_posts($args); if ($attachments) { foreach ($attachments as $attachment) { echo ‘<a href=”‘ . get_permalink() . ‘video/’ . $attachment->ID . … Read more
You can apply a filter to the output of the media insert url form using the filter named wp_media_insert_url_form: add_filter(‘wp_media_insert_url_form’, ‘ex46632_media_insert_url_form’); function ex46632_media_insert_url_form($html) { $html = str_replace(‘<input id=”src” name=”src” value=””‘, ‘<input id=”src” name=”src” value=”http://mysite.com/images/”‘, $html); return $html; } Something like this could be added to your theme’s functions.php file. This is untested code that is … Read more
untested, but it should work theoretically: add_filter(‘get_attached_file’, function($path, $file, $attachment_id){ // get the post object of the current attachment $att = get_post($attachment_id); // prepend attachment post parent ID to the file name return substr_replace($path, “{$att->post_parent}/{$file}”, -strlen($file)); }); Another filter, attempts to “fix” the path returned by WP’s upload handler: add_filter(‘wp_handle_upload’, function($results){ global $post; if(empty($post)) return … Read more
I hate to answer this with a link, But with WordPress 3.3, how it searches for permalinks have been greatly improved so you can almost put anything into the permalinks and it will be fast. http://ottopress.com/2011/how-the-postname-permalinks-in-wordpress-3-3-work/
I think you just want get_theme_root_uri(). Note that it doesn’t contain the trailing slash.
You should be able to regex it with /wp/(wp-admin/.*) and point that to /$1, thus removing the /wp/. You can do this either via .htaccess or via wordpress’ rewrite API.