Archived

This topic is now archived and is closed to further replies.

  • 0

Hook Not Following Css


Question

Posted · Report post

I tried this code below in the functions.php file in my child theme to add a button using a hook. Everything worked but the button is very small under my social icons in the header section. Shouldn't it be at the end of the social section and follow the CSS for the social bar as adding another social button would?. How do I change this so that the button is at the end of the social media section.

Code placed in functions.php:

add_action('pagelines_branding_icons_end', 'my_paypal_pay');

// function name

function my_paypal_pay(){

?>

<div class="my_paypal_pay"><a href="https://www.paypal.com/blaa_blaa_blaa"><img src="http://myimage.png" width="98" height="22"></a>

</div>

<?php }

Here is the site:

http://millfairselfs....com/wordpress/

Share this post


Link to post
Share on other sites

5 answers to this question

Posted · Report post

What CSS do you have for the <DIV> layer my_paypal_pay? Do you have this CSS configured in Custom Code > Custom CSS?

Share this post


Link to post
Share on other sites

Posted · Report post

The CSS is added in the child theme style sheet. Div class my_paypal_pay.

Share this post


Link to post
Share on other sites

Posted · Report post

What is the entire code you used for it?

Share this post


Link to post
Share on other sites

Posted · Report post

.my_paypal_pay {

  • height: 25px;
  • width: 80px;
  • margin-right: 50px;

}

The image png is 80px x 25px.

Share this post


Link to post
Share on other sites

Posted · Report post

Hi stano7, I´m not sure but...

Please you can try with

.section-branding .icons a { width: 80px;}
and
.my_paypal_pay { margin-top: -40px;}

Share this post


Link to post
Share on other sites