Front Page On/Off Option in a Child Theme

Discussion in 'Cloriato WordPress Theme' started by owen, Dec 26, 2012.

Thread Status:
Not open for further replies.
  1. owen

    owen New Member

    Joined:
    Mar 23, 2012
    Messages:
    4
    Likes Received:
    0
    Hello

    I am building a child theme for Cloriato and am noticing that the front page will no longer turn off (become a blog archive) vie theme options

    I think that the critical piece of code gets executed in functions.php (see below) but am not really understanding what happens here or why it would act differently in a child theme

    PHP:
    //Front Page Rename
    $get_status=get_option('re_nm');
    $get_file_ac=TEMPLATEPATH.'/front-page.php';
    $get_file_dl=TEMPLATEPATH.'/front-page-hold.php';
    //True Part
    if($get_status==='off' && file_exists($get_file_ac)){
    rename("$get_file_ac""$get_file_dl");
    }
    //False Part
    if($get_status==='on' && file_exists($get_file_dl)){
    rename("$get_file_dl""$get_file_ac");
    }
    Otherwise I am really liking this theme!

    Thanks for any help
     
  2. owen

    owen New Member

    Joined:
    Mar 23, 2012
    Messages:
    4
    Likes Received:
    0
    I thought I should also mention that ours is a MultiSite installation and that the root directory for the network itself is also a sub directory (/root/wordpress/blog-A and /root/wordpress/blog-B etc) in case this is a path problem

    Thanks again!
     
  3. Nitesh

    Nitesh Support Staff

    Joined:
    Oct 19, 2012
    Messages:
    5,165
    Likes Received:
    160
    Yes, Maybe multisite installation is creating this issue at your site.
    To off front page, rename it. like front-page1.php.
    It will resolve your issue.
     
  4. owen

    owen New Member

    Joined:
    Mar 23, 2012
    Messages:
    4
    Likes Received:
    0
    Thanks Nitesh

    I changed the name of front-page.php to front-page1.php in my child theme folder as you suggested and it worked!

    It now responds to theme options in the WordPress admin

    Anyway - I was just wondering why and how that worked (if you have the time to explain it)

    Thanks again!
     
  5. owen

    owen New Member

    Joined:
    Mar 23, 2012
    Messages:
    4
    Likes Received:
    0
    Never mind Nitesh

    I think I figured it out :)
     
Thread Status:
Not open for further replies.

Share This Page