inraid
Forum Replies Created
-
Forum: Plugins
In reply to: [Redirection] How to format CSV for import?use this:
Source URL, Target URL, [Regex 0=false, 1=true], [HTTP Code]
save list as .csvexample:
https://mydomain.id/scopus-list/5300152732,https://www.targetdomain.com/sourceid/5300152732,1,301
https://mydomain.id/scopus-list/29949,https://www.targetdomain.com/sourceid/29949,1,301
https://mydomain.id/scopus-list/19700188320,https://www.targetdomain.com/sourceid/19700188320,1,301Forum: Fixing WordPress
In reply to: How to add an external url to a thumbnail featured imageNevermind, i finally find it :), changed my theme though..
How to add an external url to a thumbnail featured image:
Required plugin: Advanced Custom Fields1. Add the following code to function.php
function link_url_thumb() { global $post; $thePostID = $post->ID; $post_id = get_post($thePostID); $title = $post_id->post_title; $perm = get_permalink($post_id); $post_keys = array(); $post_val = array(); $post_keys = get_post_custom_keys($thePostID); if (!empty($post_keys)) { foreach ($post_keys as $pkey) { if ($pkey=='urlthumb' || $pkey=='url_thumb' || $pkey=='thumb_url') { $post_val = get_post_custom_values($pkey); } } if (empty($post_val)) { $link = $perm; } else { $link = $post_val[0]; } } else { $link = $perm; } echo ''.$link.''; }
2. Once that’s done, open your index.php file and call the newly created link_url_thumb() function:
Find something like this in your index.php:
<a>" rel="bookmark"><?php the_post_thumbnail('pingraphy-home-thumbnail'); ?></a>
Changed to:
<a>" rel="bookmark"><?php the_post_thumbnail('pingraphy-home-thumbnail'); ?></a>
3. Create Custom Fields called urlthumb or url_thumb or thumb_url and put the external URL complete with http in the value box.
check out the result on one of the thumb image at my site: prankstuff.com