Support » Fixing WordPress » change links for featured pages

  • I am working with the custmoizr theme for the first time. I have the site @ http://macrodiver.com

    I am trying to figure out how to set the links for the three featured images to custom pages. I tried using the php from the custumizr support which is

    add_filter('tc_fp_link_url' , 'my_custom_fp_links', 10 ,2);
    function my_custom_fp_links( $original_link , $fp_id ) {
    
        //assigns a custom link by page id
        $custom_link = array(
            //page id => 'Custom link'
            2 => 'http://www.my-custom-url-one.com',
            9 => 'http://www.my-custom-url-two.com'
        );
    
        foreach ($custom_link as $page_id => $link) {
            if ( get_permalink($page_id) == $original_link )
                return $link;
        }
    
        //if no custom title is defined for the current page id, return original
        return $original_link;
    }

    I changed the page ids and links to the ids and pages of my site but still it is not working.

    any help is appreciated.

    thanks

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘change links for featured pages’ is closed to new replies.