Using child theme functions.php to overwrite plugin modal action with link

Question

Just working through a theme that i got with an added plugin. Iv made a number of changes already and have a handful left. These are mainly to do with the plugin.

So currently on the product page i have a Get Now button. This Get Now button when clicked by default opens up a modal pop up for users to login or register. I want to remove that and send users to the checkout page. Current set up:

<div class="btn-and-font" data-target=".i-am-the-modal-login" modal="login">
                    <span>Get Now</span>

I was initially thinking of setting up another plugin, copy and pasting, then overwriting the class in the file (dont know if thatll work) – but thought could i get away with sorting out in the child theme functions.php.

I was thinking could i hook into wp_head and overwrite that div class and replace the data-target with an ahref /checkout – action hook?

Am i thinking in the right direction and could i overwrite an existing class and / or add a link into an on page element using the child theme?

--------------------------------------------------

>>> Share a link to this question, just copy and paste the code bellow on your web page <<<

<a href="https://www.wptricks.com/question/using-child-theme-functions-php-to-overwrite-plugin-modal-action-with-link/">

Using child theme functions.php to overwrite plugin modal action with link</a>
0
, , Junior 1 week 0 Answers 34 views 0

Leave an answer