Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,472
There are 1711 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     Programming     PHP and MySQL :

Wordpress / PHP Help

Thread title: Wordpress / PHP Help
     
    Thread tools Search this thread Display Modes  
Prev Previous Post   Next Post Next
02-04-2012, 07:26 PM
#4
Michael C is offline Michael C
Michael C's Avatar
Status: Senior Member
Join date: Jul 2006
Location: Scotland, East Lothian
Expertise:
Software:
 
Posts: 888
iTrader: 4 / 100%
 

Michael C is on a distinguished road

Send a message via MSN to Michael C

  Old

Isn't information inputted in a meta box also available as a custom-field? At least it is the way I do it. If you show the custom fields you should see the id with value. I don't see whats wrong with:

PHP Code:
function affiliate_hide() { 
global 
$wp_query

 
$my_meta get_post_meta($post->ID,'_my_meta',TRUE);
if( isset( 
$my_meta['link'] )) {  
    
$target $my_meta['link'];   
        if(
$target == '') {  
        
wp_redirect(get_option('siteurl')); exit; // if no blog post redirects to index page. 
        

    
wp_redirect($target301); 
    exit; 
    } 

     


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed