Include file in template moving sidebar to bottom

General questions pertaining to how certain issues can be resolved
Forum rules
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?"

Include file in template moving sidebar to bottom

Postby boardtc » 07 Jun 2013, 05:57

I am migrating from my previous theme, discovering Suffusion was a great surprise! I am testing the migration using the theme test drive.

Previously I have had a number of custom templates which simply were copies of the main template with some include files added - I load the include files into the template directory, where they get updated on occasion. My motivation here was I had some folded up what's new information I reuse on a number of pages, this way I can change it in one place (the include file) and it could be seen in multiple places. I was going to do the same with Suffusion or maybe there better ideas to achieve the same?

Trying my outlined solution I copy the default template, page.php, to create a custom template and in suffusion_after_begin_post before the original post call I include the lines, e.g.
Code: Select all
            <h4>General Update</h4>      
            <?php include(TEMPLATEPATH  . '/whats_new_general.php'); ?>      


where whats_new_general.php is my own file uploaded to the template directory, which contains a html table and use 2 css classes which set the column width, totalling 500px. My include files are all of this form and are not related to any theme. This works, however my sidebar contents now appear under the page rather than at the right side for this page only.

I could not see a way to use the custom template to reshow different snippets on different pages. Any advice appreciated on what the issue might be or other ideas.

Thanks! Tom.
User avatar
boardtc
 
Posts: 46
Joined: 22 May 2013, 06:41

Re: Include file in template moving sidebar to bottom

Postby Colin » 14 Jun 2013, 05:14

One way to do what you want without editing core files is to use an ad-hoc widget area with a text widget in it. Then get the Suffusion Short Codes plug-in and you can drop that widget area into any of your posts or pages. Update the text in the text widget and it will ripple across all your pages with that ad-hoc widget area on it. You can have several of these with different text in them as you have more than one ad-hoc widget area.
Colin
 
Posts: 3572
Joined: 27 Oct 2009, 10:46

Re: Include file in template moving sidebar to bottom

Postby boardtc » 03 Jul 2013, 09:06

Hi Colin, just saw your post now, that sounds what I am looking for. I will start looking into it, thanks....
User avatar
boardtc
 
Posts: 46
Joined: 22 May 2013, 06:41

Re: Include file in template moving sidebar to bottom

Postby boardtc » 13 Aug 2013, 09:38

@colin I am trying to figure out how I can implement your suggestion. I am looking for documentation on how I assign a chunk of text a shortcode and then how I call it? I see the built it ones alight
http://aquoid.com/news/themes/suffusion ... tionality/. I must be missing some documentation. I'll keep digging.
User avatar
boardtc
 
Posts: 46
Joined: 22 May 2013, 06:41

Re: Include file in template moving sidebar to bottom

Postby Colin » 13 Aug 2013, 11:13

Have you got the short codes plug-in? If not get it.

The go to Appearance > Widgets then just drop a text widget into ad-hoc-1 widget area.

Put the content that you want in the text widget and save it.

Go to your page where you want this text to appear and on that page put [suffusion-widgets id='1'] where you want it to appear. It is as easy as that.
Colin
 
Posts: 3572
Joined: 27 Oct 2009, 10:46

Re: Include file in template moving sidebar to bottom

Postby boardtc » 14 Aug 2013, 09:42

@Colin, that is phenomenal mate!!!! I have done exactly what I have been hacking around using custom templates and include files to do all these years, absolutely brilliant, thanks for taking the time to explain to me!
User avatar
boardtc
 
Posts: 46
Joined: 22 May 2013, 06:41


Return to Support Requests

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], then and 2 guests