Jump to content
Gavin_

Hook For Custom Divider Not Working - Please Help

Recommended Posts

Gavin_+    55
Gavin_

Hello

I have used this hook to successfully add an image to a section as a divider


// Add Image to after banners


add_action('pagelines_after_banners','add_image_to_banners');


// function name


function add_image_to_banners (){ 

?>

              <div id="custom_divider_2"></div>

<?php


}


// end function
with this CSS



#custom_divider_2 {

background: url(http://www.kyle-irving.co.uk/wp-content/uploads/2012/07/custom_divider_2-copy.png)repeat-x;

height: 28px;

margin-top: -25px;

position: relative;

z-index: 1;

}



However i have just tried to use this

// Add Image to after kiboxes


add_action('pagelines_after_kiboxes','add_image_to_kiboxes');


// function name


function add_image_to_kiboxes (){ 

?>

              <div id="custom_divider_4"></div>

<?php


}


// end function

with this CSS

#custom_divider_4 {

background: url(http://www.kyle-irving.co.uk/wp-content/uploads/2012/11/custom-divider-4.png) repeat-x;

height: 28px;

margin-top: 5px;

position: relative;

z-index: 1;

}

any ideas?

you can see it all in action here

http://www.kyle-irving.co.uk/home/

Thanks

Share this post


Link to post
Share on other sites
Gavin_+    55
Gavin_

kiboxes are a section that we created based on pagelines boxes. in fact they are pagelines boxes just with encapsulated code.

Share this post


Link to post
Share on other sites
Gavin_+    55
Gavin_

ah ok i see

but when i turned the action map on i was able to see/identify hooks for kiboxes.

is there something else that needs to be done for hooks that can be seen in the action map to be usable?

thanks

Share this post


Link to post
Share on other sites
Simon    247
Simon

Maybe the hook is running too late, where did you add the code?

Share this post


Link to post
Share on other sites
Gavin_+    55
Gavin_

i have used the pagelines-customize/functions.php

// Add Image to banner above outer content


add_action('pagelines_after_contentbox','add_image_to_contentbox');


// function name


function add_image_to_contentbox (){ 

?>

              <div id="custom_divider"></div>

<?php


}


// end function


// Add Image to after banners


add_action('pagelines_after_banners','add_image_to_banners');


// function name


function add_image_to_banners (){ 

?>

              <div id="custom_divider_2"></div>

<?php


}


// end function



// Add Image to after kiboxes


add_action('pagelines_after_kiboxes','add_image_to_kiboxes');


// function name


function add_image_to_kiboxes (){ 

?>

              <div id="custom_divider_4"></div>

<?php


}


// end function



The css is in the pagelines-customize/style.css

Thanks

Share this post


Link to post
Share on other sites
James B    436
James B

Hi there, have you managed to resolve this or do you still require assistance. I've just got someone to look over for you, they advised to check there are no quotes around the url for the image. Also I've checked the image link, but I can only see a white rectangle. Is the correct image attached to the divider?


Kindly search the forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

James B

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×