MicrostockGroup Sponsors


Author Topic: Any Way to Modify Symbiostock Files Below Main Theme Directory?  (Read 4011 times)

0 Members and 1 Guest are viewing this topic.

« on: July 15, 2013, 11:34 »
0
I have had success in copying a file from the main Symbiostock Theme (webroot/wp-content/themes/symbiostock) to the Symbiostock-child Theme (webroot/wp-content/themes/symbiostock-child) and then modifying the file.

But now I am trying to customize files that are below the main theme directory (such as webroot/wp-content/themes/symbiostock/inc) and I am not having success.

For example, I am trying to customize the file "rf-custom-post-functions.php" in the webroot/wp-content/themes/symbiostock/inc folder.  I have created an "inc" directory under webroot/wp-content/themes/symbiostock-child and have copied the file there, but any changes that I make are not working.

Does anyone know if it is possible to modify a file that is below the main Symbiostock Theme directory?

And if so, how?


« Reply #1 on: July 15, 2013, 12:01 »
0
No idea what you are trying to do but I think you have to do something to all the files that the file you are working on calls upon.   Unless you know what you are doing it is very easy to break Symbiostock if you start changing things in the php files  <says she, wandering off and innocently whistling as if she had never done it >

« Reply #2 on: July 15, 2013, 12:44 »
0
A couple others have asked about this and I think Leo said he was going to make it possible in a future version by making things pluggable, so we can modify certain things in that folder. (I know I keep making small tweaks to the cart page myself) I'll see if I can find the thread, with so much going on I may have missed that change if it's already been made.

« Reply #3 on: July 15, 2013, 13:03 »
0
OK, I think that I figured it out.

I copied the following line in functions.php from the parent theme to the child theme and it now works:

     require_once('inc/rf-custom-post-functions.php');

I'm not sure if that is totally correct, but it seems to be working for now.

Hopefully someone can either confirm or deny that this is the correct way to do this.

« Reply #4 on: July 15, 2013, 13:09 »
0
That is the correct way and your code looks right. It wasn't working in earlier versions so it must be fixed, awesome!

« Reply #5 on: July 15, 2013, 14:06 »
0
Well, that doesn't seem to be the solution.  :-[

It works for a while, but then after a few minutes I get the following error (and nothing works after that):

Fatal error: Cannot redeclare symbiostock_image_manager_register() (previously declared in /home/content/23/11422623/html/wp-content/themes/symbiostock-child/inc/rf-custom-post-functions.php:9) in /home/content/23/11422623/html/wp-content/themes/symbiostock/inc/rf-custom-post-functions.php on line 99
« Last Edit: July 15, 2013, 14:32 by GeoPappas »

« Reply #6 on: July 15, 2013, 14:23 »
0
Hmm I haven't I altered that specific file, can you share what changes you are trying to make with it?  Or did you copy it unaltered into your child theme?

« Reply #7 on: July 15, 2013, 16:12 »
0
Hmm I haven't I altered that specific file, can you share what changes you are trying to make with it?  Or did you copy it unaltered into your child theme?

At first, I copied the entire rf-custom-post-functions.php file over and made some modifications to the one in the child theme, but that alone didn't do anything.  Hence, this thread was created.

I then made the change listed above to the empty functions.php file in the child theme and that worked for about 5-10 minutes, but then I started to receive the error message listed above.

I then tried to change the line in the functions.php to:

     require('inc/rf-custom-post-functions.php'); (instead of require-once)

But that does the same thing - it works for about 5-10 minutes and then throws the same error listed above.

I have also tried to ONLY include the changed functions in the child-theme rf-custom-post-functions.php file that I modified, but I still get the same results.

I have googled this issue for hours and haven't found a solution.  I'm sure there is one, I just don't know what it is yet.

Thanks for your help.

« Reply #8 on: July 16, 2013, 09:02 »
0
I would appreciate if someone could test this out from their side.  This way I can tell if the issue is specific to my setup, host (GoDaddy), etc.

The requested changes below shouldn't cause any issues to your website at all and customers will not be able to see these changes (since they will show up on the WordPress Admin backend).

Please try the following:
  • Create a folder / subdirectory under the child theme (wp-content/themes/symbiostock-child) called "inc"
  • Copy the file "rf-custom-post-functions.php" from the main theme (wp-content/themes/symbiostock/inc/) to the child theme (wp-content/themes/symbiostock-child/inc/)
  • Modify line 9 of the "rf-custom-post-functions.php" file in the child theme (wp-content/themes/symbiostock-child/inc/) from
         'name' => 'Symbiostock Images',
    to
         'name' => 'My Images',
    (or anything else that you want it to display)
  • Go to the WordPress Admin site (<your website name>/wp-admin) and choose "Royalty Free Images" -> "All Images" (near the bottom of the left sidebar) and take a look at the title near the top of the page to see if it says "Symbiostock Images" or "My Images" (or whatever you changed it to).

You can always back out any of these changes at a later point if you want.

In my case, it didn't work, but I am wondering if this might be something specific to my setup, host (GoDaddy), etc.

I appreciate any help that one can offer.
« Last Edit: July 16, 2013, 09:10 by GeoPappas »

« Reply #9 on: July 16, 2013, 10:47 »
0
Does this do anything to the customer side of the site or just change the name where only the site owner can see it?  I cannot work out exactly what you are trying to achieve

« Reply #10 on: July 16, 2013, 12:56 »
0
Does this do anything to the customer side of the site or just change the name where only the site owner can see it?  I cannot work out exactly what you are trying to achieve

As I stated above, it doesn't change anything on the customer side.  It only changes something that the site owner can see.  I figured if I asked someone to test something that the customer would see then I wouldn't get many takers, so that is why I am doing something simple like this that won't affect the customer side.

I cannot work out exactly what you are trying to achieve

I am trying to figure out how to customize the child theme when files are below the main theme folder (wp-content/themes/symbiostock-child).  As I stated above, changes made to files in the main theme folder seem to work fine, but changes made to folders below the main theme folder don't.

« Reply #11 on: July 16, 2013, 13:20 »
0
Nope, it's not just you, I'm on Bluehost.  I tried it and got:

Fatal error: Cannot redeclare symbiostock_image_manager_register() (previously declared in /home/cartoo11/public_html/wp-content/themes/symbiostock-child/inc/rf-custom-post-functions.php:9) in [...]public_html/wp-content/themes/symbiostock/inc/rf-custom-post-functions.php on line 99

I did notice that rf-custom-post-functions.php has two calls to included classes that may cause issues.  I'm going to test adding them and do some research.

« Reply #12 on: July 16, 2013, 13:48 »
0
Nope, it's not just you, I'm on Bluehost.  I tried it and got:

Fatal error: Cannot redeclare symbiostock_image_manager_register() (previously declared in /home/cartoo11/public_html/wp-content/themes/symbiostock-child/inc/rf-custom-post-functions.php:9) in [...]public_html/wp-content/themes/symbiostock/inc/rf-custom-post-functions.php on line 99

I did notice that rf-custom-post-functions.php has two calls to included classes that may cause issues.  I'm going to test adding them and do some research.

Amanda_K:

Thanks a bunch.  Now I know it's not just me.  Hopefully I can figure this out, because I would like to customize quite a few things.

« Reply #13 on: July 16, 2013, 13:50 »
0
Nope, it's not just you, I'm on Bluehost.  I tried it and got:

Fatal error: Cannot redeclare symbiostock_image_manager_register() (previously declared in /home/cartoo11/public_html/wp-content/themes/symbiostock-child/inc/rf-custom-post-functions.php:9) in [...]public_html/wp-content/themes/symbiostock/inc/rf-custom-post-functions.php on line 99

I did notice that rf-custom-post-functions.php has two calls to included classes that may cause issues.  I'm going to test adding them and do some research.

Amanda_K:

Thanks a bunch.  Now I know it's not just me.  Hopefully I can figure this out, because I would like to customize quite a few things.

My intuition tells me that it is how the function symbiostock_image_manager_register is called, rather than what functions it calls (but I am a novice at PHP & WordPress, so you are probably correct).


 

Related Topics

  Subject / Started by Replies Last post
5 Replies
3104 Views
Last post May 20, 2013, 11:39
by cascoly
4 Replies
2153 Views
Last post June 18, 2013, 11:07
by Redneck
2 Replies
2841 Views
Last post July 10, 2013, 07:17
by ernstsg
1 Replies
1953 Views
Last post July 14, 2013, 15:00
by cathyslife
2 Replies
2060 Views
Last post August 12, 2013, 05:18
by Roberto

Sponsors

Mega Bundle of 5,900+ Professional Lightroom Presets

Microstock Poll Results

Sponsors