Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm working on an old WP Multisite instalation (3.0.1) and something weird is happening.

The guy who built the site made a decision to store direct URLs instead of Post IDs to a Custom Field. And this is creeping me with:

// String stored on the database: `http://example.com/wp-content/uploads/2012/07/filename.pdf`
// Code
$cf = get_post_custom($post->ID);
$pdf = $cf['meta_key'][0];
// Result
$pdf == 'http://example.com/wp-content/sitename/files/2012/07/filename.pdf' // true

Any ideas why this might be happening? Why is the URL string being rewritten?

share|improve this question
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.