no what i mean is where is the PHP/Wordpress code that generates the images? For example I see this in loop-single-3.php:
echo $td_mod_single->get_image('td_681x0');
so where can i see what this command does? im trying to find the php that tells the theme the URL path of the image
Hi
The theme chose a specific size fore the featured image depending by post template used and td_681x0 it’s a parameter sent to get_image() function which is located in td_module_single_base.php: http://screencast.com/t/TPChDS6QNI
When a image it’s uploaded the theme generate a new thumb for each size enabled from theme panel > thumbs on modules and blocks: http://screencast.com/t/RkKPz6IJTiib That thumbs are stored in uploads folder which is located in WordPress’s core. The theme does not set a specif link for the images, it only chose which image will be displayed in a specif place.
Thanks!
getting closer! if you look at this code here:
$image_html = '';
I believe what I’m looking for is: $featured_image_full_size_src[‘src’].
im trying to redefine the domain in the image source URL. Heres an example: http://www.domain.com/uploads/image-file.png
In the above im trying to redefine the part in bold
Hi
The indicated variable keep the image’s url but without thumb type: http://screencast.com/t/5JxeV5aZE I am not very sure how you’re trying to redefine the domain name. The domain name it’s not controlled by the theme and also the place where images are stored. The url for each image looks like this in wordpress: http://www.domain.com/wp-ontent/uploads/year/image-file.png You can’t change that path from the theme as it’s generated by WordPress.
Thanks!
i know its generated by wordpress but where can that be changed? If I were to use a CDN, the CDNs URL would replace the wordpress URL so theres gotta be somewhere where http://www.domain.com can be changed. right now its using the domain where the wordpress install is, but the current domain and the wordpress install domain are different so i want to change the domain in the image URL to the current domain
Useful to look at things like the wp-config.php file where you can specify the uploads folder for images, which all core functions then pick up automatically.
https://codex.wordpress.org/Editing_wp-config.php#Moving_uploads_folder
Wordpress official docs are great place to learn how core WP functions work. Most themes call standard core functions/paths and don’t set new paths unique to theme.
Also, you can set the explicit domain name in the wp-config file.
Note changing any of these does *not* change image paths already inserted into the posts or dbase. You must do a dbase search/replace to change that – it cannot be changed automagically anywhere else.
If an image was placed in a post at former domain, there isn’t any theme or WP setting to change that unless it’s dropping in featured image, where it *would* update. But anything “placed” into a post is there forever until updated in dbase.
Not sure that helps, just some pointers :-0