2010-11-19, 21:07:46
(This post was last modified: 2010-11-19, 21:12:16 by Abu fateh bappy.)
Hi Zegnåt,
thanks for this function, it's very useful.
In one of my project I need to change a component in page by return_page_slug and return_parent, so I modified your first script in
As you can see I'm not a php coder, so I would like to know if the script is ok about you or you have to suggest something to me.
Thanks in advance!
thanks for this function, it's very useful.
In one of my project I need to change a component in page by return_page_slug and return_parent, so I modified your first script in
Code:
if ( return_page_slug() == 'index' ) {
get_component('component-1');
} elseif ( return_page_slug() == 'page-1' ) {
get_component('component-2');
} if ( return_parent() == 'index' ) {
get_component('component-1');
} elseif ( return_parent() == 'page-1' ) {
get_component('component-2');
}
As you can see I'm not a php coder, so I would like to know if the script is ok about you or you have to suggest something to me.
Thanks in advance!