custom links not working
-
Hello – I am using the customizr theme and I am aware of their support page. I’ve posted there weeks ago and have got zero response, so hoping someone can help with this:
on the home page i am trying to use this php snippet to add custom links to the three featured images. on my site i have changed the ids to the corresponding pages but it is not working. I did use this on my localhost and it worked, so really can not figure out why it isn’t on the live site??
https://macrodiver.com —- any help solving this is greatly appreciated.
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 => 'https://www.my-custom-url-one.com', 9 => 'https://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; }
- The topic ‘custom links not working’ is closed to new replies.