![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Industry Role:
Join Date: Jul 2008
Location: In your back seat with duck tape
Posts: 4,568
|
Wordpress Help: How to convert thumbnail custom field to featured image
I hate when i buy a cool looking wp theme only to find out that the author made it impossible to edit. I recently purchased the cooolzine theme at themeforest and its a great looking theme, however I want to use it on a site that used to use custom fields for the thumbnail, and the theme seems to only work with the featured thumb. Usually when i find an issue like that with a theme i edit it to either use a php statement that uses the featured thumb or a image script like timthumb, or i like to use the get_the_image plugin by justin tadlock. However this theme calls the thumb in a way that i dont understand, so i wonder is there a plugin or script i could run to link images stored on the server in a custom field to the post thumbnail feature. Here a sample of the code if anyone want to take a whack. Also if you can code this reasonably fast hit me up let me know how much and how soon.
Code:
<div class="box article '.$cat[$firstcat]->slug.' '.$tagclass.'"> <div class="text">'; if (!empty($image)){ $extralen = 0; $ret .= ' <div class="thumb"> <img src="'.$src[0].'" alt="'.$post->post_title.'" title="'.$post->post_title.'" /> <a href="'.get_permalink($post->ID).'">'.__('read more').'</a> </div><!--thumb--> '; } // has images if ($tlen >= 1 && $tlen <= 20) { $headrows = 1; $alen = 160 + $extralen; } if ($tlen > 20 && $tlen <= 40) { $headrows = 2; $alen = 115 + $extralen; } if ($tlen > 40 && $tlen <= 66) { $headrows = 3; $alen = 100 + $extralen; } if ($tlen > 66 && $tlen <= 88) { $headrows = 4; $alen = 55 + $extralen; } if ($tlen > 88) { $alen = 55 + $extralen; } $pattern = get_shortcode_regex(); $clean = strip_tags(preg_replace('/'.$pattern.'/s', '$1$6', $post->post_content)); $cut = substr($clean,0,$alen); $ret .= '<div class="meta"><a class="cat-'.$cat[$firstcat]->slug.'" href="'.get_category_link($cat[$firstcat]->cat_ID).'">'.$cat[$firstcat]- >name.'</a></div><!--meta--> <h2 class="hyphenate"><a href="'.get_permalink($post->ID).'">'.$post->post_title.'</a></h2> <a href="'.get_permalink($post->ID).'"> <span class="hyphenate"> '.$cut.' › </span> </a> </div><!--text-->
__________________
High Performance Vps $10 Linode Manage your Digital Ocean, Linode, or Favorite Cloud Server. Simple, fast, and secure Server Pilot |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Industry Role:
Join Date: Jul 2008
Location: In your back seat with duck tape
Posts: 4,568
|
Note to self: dont ever buy another wordpress theme
![]()
__________________
High Performance Vps $10 Linode Manage your Digital Ocean, Linode, or Favorite Cloud Server. Simple, fast, and secure Server Pilot |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Too lazy to set a custom title
Industry Role:
Join Date: Aug 2002
Posts: 55,359
|
might be a plugin to convert them (import), how many posts we talking about here?
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence. ![]() WP Stuff |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Industry Role:
Join Date: Jul 2008
Location: In your back seat with duck tape
Posts: 4,568
|
Its only like 50 ive tried a couple different plugins to no avail.
__________________
High Performance Vps $10 Linode Manage your Digital Ocean, Linode, or Favorite Cloud Server. Simple, fast, and secure Server Pilot |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Confirmed User
Industry Role:
Join Date: Jul 2008
Location: In your back seat with duck tape
Posts: 4,568
|
This plugin: http://wordpress.org/extend/plugins/get-the-image/ works great but i cant figuire how to intergrate it into this theme, my php is not that advanced
![]()
__________________
High Performance Vps $10 Linode Manage your Digital Ocean, Linode, or Favorite Cloud Server. Simple, fast, and secure Server Pilot |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
marketer.
Industry Role:
Join Date: Aug 2006
Location: bcn
Posts: 2,280
|
does calling
get_the_image() not work? just do <? echo get_the_image(); ?> from within the loop. does that not output ur pic? |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
(>^_^)b
Industry Role:
Join Date: Dec 2011
Posts: 7,223
|
Someone asked the author that question before and he said:
"Hey, either change the way cooolzine displays the posts: lib/functions/cooolzine.php - cooolzine_toparticle() - cooolzine_boxarticle() or have a look a the functionality of the post2media plugin which does the picture attachment. Cheers" Does this help?
__________________
![]() I've referred over $1.7mil in spending this past year, you should join in. ![]() ![]() I make a lot more money in the medical field in a lab now, fuck you guys. Don't ask me to come back, but do join Chaturbate in my sig, it still makes bank without me touching shit for years.. ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
Confirmed User
Industry Role:
Join Date: Aug 2002
Location: Midwest
Posts: 1,276
|
Make a csv file for your images and then import the csv,
you could also do an auto featured image import |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
So fuckin' bored
Industry Role:
Join Date: Jun 2003
Posts: 32,384
|
With CyberSEO you can do it as easy as this:
![]()
__________________
Obey the Cowgod |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 | |
Confirmed User
Industry Role:
Join Date: Jul 2008
Location: In your back seat with duck tape
Posts: 4,568
|
Quote:
__________________
High Performance Vps $10 Linode Manage your Digital Ocean, Linode, or Favorite Cloud Server. Simple, fast, and secure Server Pilot |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 | |
Confirmed User
Industry Role:
Join Date: Jul 2008
Location: In your back seat with duck tape
Posts: 4,568
|
Quote:
![]()
__________________
High Performance Vps $10 Linode Manage your Digital Ocean, Linode, or Favorite Cloud Server. Simple, fast, and secure Server Pilot |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#12 |
Confirmed User
Join Date: Dec 2005
Location: Toronto
Posts: 624
|
This is placeholder so I don't forget...
I've been using Wordpress since 2005 and - up until recently - I had been using TimThumb and/or custom fields to generate thumbnails. With the "new" Wordpress, I switched all my themes to show "Featured Images" and - of course - all my thumbnails disappeared. I have a script/function that will pull any image from any post and display it as a featured image or thumbnail on your homepage (if the post has an image, that is). It also has bootstrap capability that pulls images and posts to your front page like Facebook ot Pinterest and makes your homepage an never ending wall of posts. I have been meaning to seperate the funcionalitly for awile. Maybe I will give it a shot this weekend. It works like this theme (Ipin?), but a lot better: http://www.feedmeamateurs.com/ |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#13 | |
So fuckin' bored
Industry Role:
Join Date: Jun 2003
Posts: 32,384
|
Quote:
![]()
__________________
Obey the Cowgod |
|
![]() |
![]() ![]() ![]() ![]() ![]() |