Simple change in child theme not showing for Edublogs

Hi, I am trying to make simple change in Edublogs via the child theme but it doesn't seems to work. I basically wanted to have 4 featured boxes instead of 6 showing on the front page. To get that going all I need to do is delete/comment the service-mode.php file for the 5th and 6th feature boxes (line 111-163) and it will show just 4 boxes.

I made a copy of service-mode.php and deleted line 111-163 and copied it into the edublog child theme. I checked that my child theme is loaded instead of the parent them on my WPMU site. Then check that only child theme is enabled. When I try to load the site it still shows 6 feature boxes, seems like it is not reading from the child theme at all.

I then tried to disable both the parent and child theme and it is still not working. Can someone advise on what is wrong?

  • Tammie

    @Nestor: Hi and welcome to WPMU DEV.

    In front-left.php you will see this line:

    <?php include (TEMPLATEPATH . '/service-mode.php'); ?>

    You have to change that to be something like

    locate_template( array( '/service-mode.php' ), true ); ?>

    The problem is it's looking in the parent for the file not the child I think.

    However to fully know this if you do that change and it does not work you will need to provide a link.

    This theme is being worked on for an update and I think this is going to be part of the update. However, I will make sure I tag this for the attention of the developer doing the update so they can comment if anything to add to that. We don't have a date for that update though yet.

  • Nestor

    @tammie: I made the change and it's now loading from the child theme. I can see that only 4 features boxes are showing now instead of 6. However, a problem surfaced. I have previously configured the feature boxes under Services Settings with custom graphics, title and description for each other feature boxes. After loading from the child theme, all of these settings are now gone and it's revert to the default values. I went back to the dashboard as administrator and clicked on Service Settings and to my surprise it's still showing the custom text and graphics there, even though it's not loading on the frontpage.

    Any idea why?

  • Tammie

    @nestor: I assume it's something to do with way you set up theme options shouldn't have an effect if do it properly but let me flag Richie as he may be able to comment on any impact on this theme from your changes. To be honest if you are doing theme options you are entering configuration we don't usually support (I think that's what you are saying you are doing yes adding more theme options?). That said let me flag for Richie so he can come in with his opinion.

  • Nestor

    That will be awesome.. maybe Ritchie will be able to shed some light here...

    Just a quick note. I went to the service-mode.php file under the child theme after it started loading from the theme and did a echo on all the variables (eg $upload_path, $tn_edus_headline1_link etc) under each service block.. and it returned nothing. So even thought the file is loaded the variables are for some reason not getting the values they should be getting, in which case all the "<?php if(file_exists($upload_path . 'edu1_thumb.jpg')) { ?>" statements fail and it goes right into the default values. This is even though the image files are present.

    Hopefully Richie can explain a little more on what's wrong here. All I'm trying to do is to get the child theme to load service-mode.php properly in this case, not too sure if that is within your support scope or not.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.