edit theme-functions.php

Hi, I need to make a change in the function mfn_post_thumbnail in the file functions/theme-functions.php.  I want to change the icons that appears when you hover over an item in the portfolio. I only want the search-icon and the forward.  I want to delete  the link-icon.

I made the changed in the PARENT theme, I tested and it works. But now I would like to make this change in CHILD instead.    

How can I make it? I tried to override the function mfn_post_thumbnail in the file CHILD/functions.php but I get an error. I tried to make the same subdirectory (functions/theme-functions.php)  in the child  but ...nothing.

Please let me know how can I make this change. 

Thank you very much! 

Comments

  • Hi,

    why you can't remove this icon with simply css? This is much better and easier solution.

    However if you really want to play with child theme, then please have a look at http://forum.muffingroup.com/betheme/discussion/3128/theme-shortcodes-php-doesn-t-work-in-betheme-child where we explained everything.
  • Hi, I follow all the instructions there, but I still get the error. I looked the functions example that you used, and there is one  difference: the one that you used,  sc_alert, has the condition:  

    if( ! function_exists( 'sc_alert' ) )  in the theme-shortcodes.php.

    The one that I need to change: function mfn_post_thumbnail doesn't have this condition in theme-functions.php.

    I don't think that the change I need can be made by css. I don't want that the post can be open in a page like a blog. I just want that you can zoom the image or open the link to the website.

    Please, let me try to explain better in a new post what I want to do because I know it is confusing.

    Thank you very much.

  • Continuing...


    in the portfolio, I want to enter 2 kind of post: only image and image with a website.

    Case 1: you hover over an item if it is a IMAGE it only shows the search-icon,  but I don't want the empty space where it was the link-icon, I just want the search-icon.


    Case 2: you hover over an item if it is a IMAGE and WEBsite it shows the search-icon, and the forward icon, but it doesn't show an empty space where the link-icon should be.  


  • edited February 2015
    I tried this in the parent and it works, but I would like to make it in the child.

    theme-functions.php , line 840  

    $image_links_class = 'double'; // PRV here change from triple to double 

    // PRV delete this. So now it would be $image_links_class  single (predefined) or double

    //else {

    // $image_links_class = 'double';

    //} PRV_END

    theme-functions.php , line 891

    //PRV delete this line where it shows the icon-link $link_after .= '<a href="'. get_permalink() .'" class="link"><i class="icon-link"></i></a>';


    Thanks, I hope you can help me! You guys rock :)


  • edited February 2015
    Sorry but there is nothing else what we can explain because topic above explain everything. Many people use this solution (as this is how Child Theme works) and works fine. If it doesn't work in your case, then you must contact with your website developer because we are 100% sure that above solution works.

    P.S. Please notice that we do not offer theme customizations because for that responsible is website developer. And after any modifications only developer is responsible for any bugs or problems.
Sign In or Register to comment.