Jump to content


Photo
- - - - -

ecoPro: Custom template, how to show feature and boxes.


This topic has been archived. This means that you cannot reply to this topic.
7 replies to this topic

#1 danbowyer

danbowyer

    Member

  • Members
  • PipPip
  • 14 posts

Posted 12 January 2011 - 01:15 PM

Sorry... more questions. :) I am using EcoPro. I want to add 5 blog posts underneath the welcome/introduction of the site (

Please Login or Register to see this Hidden Content

). Normally, I copy the template and simply add the php snippet within that generates the blog. When I copy the template page-feature-page.php and rename the file to home.php, and rename the template to "home", I completely lose both the feature and the boxes I created. I am assuming in order for them to show, the code is looking for the specific template names. How can I make the boxes and feature page to show on a custom template?

#2 cmunns

cmunns

    Advocate

  • Members

  • 6537 posts

Posted 12 January 2011 - 05:55 PM

Can we see what that template looks like? It sounds like you need to add the conditional for your new page to the _template.php file Let me know if you need help on adding that page to the code

#3 danbowyer

danbowyer

    Member

  • Members
  • PipPip
  • 14 posts

Posted 14 January 2011 - 03:17 PM

Great, thanks very much. I added my template to the conditional and now the feature and boxes are showing.

Now, I'm trying to add my latest 5 blog posts using this code:

Please Login or Register to see this Hidden Content


The problem is, if I add it to the bottom of my home.php which has only the template code in:

Please Login or Register to see this Hidden Content


The blog gets added to the footer (which I kind of expected). I'm not sure how to edit the templates though to make the blog show up right underneath the page content which is my introduction/welcome message (that I wrote using the Wordpress CMS). I would be tempted to use the usual Wordpress page.php calls, but I'm assuming I'd lose the feature and boxes then.

#4 arpowers

arpowers

    Founder

  • Administrators
  • 3270 posts

Posted 15 January 2011 - 04:20 AM

Well all you need to do to 'show' those partial templates, is include them via PHP e.g.. `get_template_part('pro/template_feature');` but you'll also need to make sure you include the JS for the feature slider/boxes in the header.

#5 danbowyer

danbowyer

    Member

  • Members
  • PipPip
  • 14 posts

Posted 19 January 2011 - 12:35 PM

Sorry, could you explain a bit more. Not that great with PHP, don't quite understand what I'd have to do. Thanks

#6 cmunns

cmunns

    Advocate

  • Members

  • 6537 posts

Posted 19 January 2011 - 05:49 PM

okay first would be to add the name of your new page template to the conditional code here in the header to initialize the js: ` ` You could even add it to the front like this `

#7 danbowyer

danbowyer

    Member

  • Members
  • PipPip
  • 14 posts

Posted 24 January 2011 - 10:31 AM

Great, so got the template working now. Just need to add 5 latest blog posts to the home page. Tried to put the snippet in the home.php template, but it adds the blog to the footer. How can I make the blog show up underneath the "Welcome" text.

#8 cmunns

cmunns

    Advocate

  • Members

  • 6537 posts

Posted 24 January 2011 - 07:31 PM

instead of adding the code to the home.php file add it to the _template.php file underneath the call to this line: `` and also wrap it in this `.......` so it doesn't show on every page.