Skip to content
This repository has been archived by the owner on Sep 16, 2019. It is now read-only.

Functions Conflict in Child theme #211

Closed
theodorocaliari opened this issue Feb 12, 2015 · 5 comments
Closed

Functions Conflict in Child theme #211

theodorocaliari opened this issue Feb 12, 2015 · 5 comments

Comments

@theodorocaliari
Copy link

Hi @olefredrik, I found a little problem when developing my child theme of FoundationPress. When I try to customize the pagination with the same function name of parent theme, I recieve the error of "redeclare function"... Searching for a solucion on the web I found this link ( http://wordpress.stackexchange.com/questions/95799/is-it-possible-to-disable-a-function-of-a-parent-theme ). I make a test on local theme, make change on parent theme and works. If in parent theme every the function it was declared with if(!function_exists(" ")){} this will make the child theme able to replace the parent function with same name.
Example:

if(!function_exists("FoundationPress_pagination"){
FoundationPress_pagination(){
//parent theme pagination code
}
}

Please take a look on that....
Thanks...

@themestechnology
Copy link
Contributor

Are you using the latest version this was patched?

@theodorocaliari
Copy link
Author

Hi Phill, I really don't know... :(
I will look into it... thanks...

@theodorocaliari
Copy link
Author

Well, I think my version is out dated...
Why my wordpress no highlight is a new version available?

@themestechnology
Copy link
Contributor

Well I guess this is not a plugin on the WP repository and the theme does not have any API that checks with github for the latest version, so no I would not expect the theme to announce a change in WP

@theodorocaliari
Copy link
Author

Thanks Phill...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants