Take your website
To the next level
Discover our newly launched customization services and elevate your web projects to new heights.
Delegate tasks, save time, and unlock the power of professional WordPress outsourcing.

Okay
  Public Ticket #3486383
replace buttons
Closed

Comments

  • Michael Kelleher started the conversation

    need to replace buttons on portfolio and woocommerce. see attached

    Attached files:  replace-buttns.jpg

  •  7,092
    Oliver replied

    Hi,

    Add this code to the functions.php of the child theme:

    function thegem_change_text( $translated_text ) {
        if ( $translated_text == 'Read more' ) {
            $translated_text = 'Something';
        }
        return $translated_text;
    }
    add_filter( 'gettext', 'thegem_change_text', 20 );

    And use this CSS code as example:

    .portfolio-item .caption .gem-button {
        border: 1px solid #ccc;
        background-color: #e4e0df;
        font-size: 15px !important;
        padding-right: 50px;
    }
    .portfolio-item .caption .gem-button:after {
        content: '\e601';
        font-family: 'thegem-icons';
        width: 40px;
        background-color: #000;
        position: absolute;
        right: 0;
    }
    

    add it to the style  style.css file 

    Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list. 

    Regards, Oliver

  • Michael Kelleher replied

    Hi Oliver,

    We are actually wanting to replace the entire gem button with our custom image button, not the text. please see attached.


    Sorry for the confusion.


    KMK

    Attached files:  replace-buttns.png

  •  7,092
    Oliver replied

    HI!

    CSS example:

    a.gem-button.gem-button-style-outline {
        border: none !important;
        background-image: url(https://2k7064.p3cdn1.secureserver.net/wp-content/uploads/2023/09/learn-more-1.jpg);
        background-size: cover;
        font-size: 0;
        width: 143px;
        height: auto;
    }

     

    3938581396.jpg

    Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list. 

    Regards, Oliver

  • Michael Kelleher replied

    WOW OUSTANDING!!!!


    Thank you very much.

  •  7,092
    Oliver replied

    Welcome!

    Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list. 

    Regards, Oliver

  • Michael Kelleher replied

    sorry to bother you. Cant figure out how to connect this button image (ATTACHED) which is resized to replace the one you just gave us code for?


    We dont know how to access this part of the server: 

    https://2k7064.p3cdn1.secureserver.net

    Attached files:  learnmore-btn.jpg

  •  7,092
    Oliver replied

    It seems like you're using CDN, that's why there is strange image URL in my code, you just need to put your image URL here:

    https://prnt.sc/Nxy-L4d2A5Vz

    Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list. 

    Regards, Oliver

  • Michael Kelleher replied

    I changed URL to: see attached

    But the image does not show up. It defaults to the standard button. Very strange, 

    learn-more-1.jpg

    Attached files:  changed-URL.png

  •  4,772
    Michael replied

    Hi,

    I fixed the error in the code.

    Pleae check your site now.

  • Michael Kelleher replied

    THank you so MUCH!!!

  •  4,772
    Michael replied

    You're welcome!

    Have a nice day!