Future-Proofing Edits

General questions pertaining to how certain issues can be resolved. This forum is closed with effect from February 2019. Please post future requests on https://github.com/sayontan/suffusion.
Forum rules
This forum is closed with effect from February 2019. Please post future requests on https://github.com/sayontan/suffusion.

1. No offensive language and no mocking
2. Please do a thorough search before you post something. Trust us, there is a high probability that the question you are asking has been asked previously.
3. No soliciting. You cannot post here soliciting bids for people offer you quotes, or even offer money to people for some work. You will be moderated if you do so. If you are looking for help, please post your request on http://jobs.wordpress.net or http://codepoet.com
4. Please be reasonable. You are getting software and support. For free. Complicated requests from a general purpose theme are not welcome and some volunteers might lose patience with you.
5. Please do your due diligence. If you posted a query and we answered with a link, take the trouble to go through the link contents.
6. Please post with complete information. Requests for help MUST be accompanied with your URL, particularly if you are asking something like "Why am I seeing a blank space?"
Locked
patrickgraham
Posts: 4
Joined: 06 Jul 2011, 12:46

Future-Proofing Edits

Post by patrickgraham » 06 Jul 2011, 12:51

Hi,

I have started using this very fine theme on my website and have contributed to your coffee fund. Big thanks for developing it. :)

I have made most of my edits to the Custom Includes section of the suffusion options, as well as other changes to the settings in the options menus. I assume all this is safe from updating?

The issue will be how I incorporated my header and menu from the rest of my site. I edited these directly into the actions.php file. I know I could have put the header in with the options menu, but I couldn't work out how to edit in my main site menu and exclude the Suffusion top navigation menu and search bar, which is why I went down this route.

What would I need to do in order to future proof my edits – is there a way to do this?

Thanks again.

http://patrickgrahamphotography.co.uk/blog/

Dark_Fox28
Posts: 574
Joined: 26 Nov 2009, 08:40
Location: Scotland
Contact:

Re: Future-Proofing Edits

Post by Dark_Fox28 » 06 Jul 2011, 12:57

You could download a backup of actions.php file and just copy and paste the changes whenever a new release comes out.

You are right about the custom includes, all safe.

patrickgraham
Posts: 4
Joined: 06 Jul 2011, 12:46

Re: Future-Proofing Edits

Post by patrickgraham » 06 Jul 2011, 13:34

OK. I take it there's no way to do this that's easier to maintain?

Just to be extra cautious, I thought I'd try it on a backup. So I downloaded the theme from my site, renamed it in style.css and re-uploaded. For some reason it's killed all the formatting, even on the Suffusion options page. Are there any dependent files outside the theme directory?

sayontan
Site Admin
Posts: 10210
Joined: 15 Sep 2009, 16:39
Location: Houston, Texas
Contact:

Re: Future-Proofing Edits

Post by sayontan » 06 Jul 2011, 15:47

Well, there is absolutely an easier way to do this - a child theme. This will take a little bit of work, but you could essentially have your own header.php file for your child theme. E.g. Take a look at http://mynethome.net. Now take a look at http://mynethome.net/blog. Both are on the same WP installation, yet the title and sub-title for both the pages are different. This happens to use a child theme.

When you upgrade, you will be upgrading Suffusion only - the child theme will be safe from any upgrades whatsoever, so your edits will stay fine.

patrickgraham
Posts: 4
Joined: 06 Jul 2011, 12:46

Re: Future-Proofing Edits

Post by patrickgraham » 07 Jul 2011, 03:32

OK, cool.

I tried making a child theme. I included the following files:

style.css
header.php
/functions/actions.php

Then I updated the parent. It lost the header, so I manually updated the parent's actions.php and now it looks as before. Are there some other files that I need in the child theme to tell it to 'get' the actions.php from the child?

sayontan
Site Admin
Posts: 10210
Joined: 15 Sep 2009, 16:39
Location: Houston, Texas
Contact:

Re: Future-Proofing Edits

Post by sayontan » 07 Jul 2011, 06:14

style.css
header.php
/functions/actions.php
That won't work. You need style.css and header.php. If you are creating your own hooks, do them in functions.php (as opposed to a copy of actions.php - that will have no effect)
It lost the header, so I manually updated the parent's actions.php and now it looks as before.
Then you are at the same spot as before. Your changes will be lost in an upgrade.

patrickgraham
Posts: 4
Joined: 06 Jul 2011, 12:46

Re: Future-Proofing Edits

Post by patrickgraham » 07 Jul 2011, 06:35

Yes, of course. I don't know why I mentioned that – I just did it to stop my website appearing broken while I waited for your response.

In terms of editing the functions.php with the info I pasted into actions.php, where do I put that? I originally started using actions.php because a document search threw up the header-container div.

This is what I want to add to the header, I just don't know where to put it in functions.php:

Code: Select all

 <!-- Beginning of HTML Header -->
	
		
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title>Patrick Graham Photography</title>

</head>

<body>
  <div id="banner"><a href="http://www.patrickgrahamphotography.co.uk" title="Patrick Graham Photography" target="_self"><img src="../../../../../images/logo2.png" alt="Patrick Graham Photography"></a></div>

<div id="menu" align=center>
 
 <table width="1020px" border="0" cellspacing="0" cellpadding="0" height="100%">
    <tr>
      <td width="20%" align="center"><a href="../../../../../about/index.html" style="display: block;">About</a></td>
      <td width="20%" align="center"><a href="http://patrickgrahamphotography.co.uk/blog/" style="display: block;">Blog</a></td>
      <td width="20%" align="center"><a href="../../../../../galleries/index.html" style="display: block;">Galleries</a><a href="../../../../../contact/index.html"></a></td>
      <td width="20%" align="center"><a href="../../../../../cv/index.html" style="display: block;">CV</a></td>
      <td width="20%" align="center"><a href="../../../../../contact/index.html" style="display: block;">Contact Details</a><a href="../../../../../cv/index.html"></a></td>
    </tr>
  </table>
</div>




<!-- End of HTML Header -->

Locked