Forum Support

 
Advanced Search


New Posts
FAQs for Wordpress
If you have a question about Wordpress products please read through a list of our most commonly asked questions here.
[1]

Offline boyjpf1
Free Member
Posts: 4
Posted on: November 27, 2015, 08:27:16 AM

I have been asked to create some new template pages for a website running your Business Pro theme. Each attempt at creating new templates results in a
page full of Œvertex code errors.

Do you have a sample child theme you could send me to use as a base to develop the new templates?
Logged

Offline Tristan Rineer
Free Member
Posts: 3858
Posted on: November 30, 2015, 07:49:15 AM

Could you give more detail about what exactly you are trying to do?

The framework doesn't currently support page templates; this is due to the fact that by using something like Widget Context, you can have a completely different layout on every page just by showing or hiding widgets.  The themes and framework are designed to dynamically change the layout based on what widget positions are active on each page.

Child themes are also not currently supported, but all updates are done using the Vertex Upgrade Patch, which only changes framework files, nothing theme-specific; if you are concerned about losing customization and styling because of an update, you don't need to be.
Logged

Offline boyjpf1
Free Member
Posts: 4
Posted on: December 01, 2015, 05:34:11 AM

Basically they want to integrate a third party api into the website to pull data via the api on to the page.

What we normally do is create a new template based on say page.php or a full width existing template and use this template to automatically connect to the api and display the jobs. We create two templates, a job search (containing a search form and paginated results) and a job detail (containing further details about the job and an application form).

How would you suggest we do this with the Business Pro theme?
Logged

Offline Tristan Rineer
Free Member
Posts: 3858
Posted on: December 01, 2015, 12:40:05 PM

If the code that you use rarely changes more than just the API key used to define which account information is displayed, I would actually recommend making a simple plugin with shortcodes for the 2 types of content.  Then, instead of having to create a custom page template on every site you do, all you would have to do is install & activate the plugin, then drop in the shortcodes.  Something like [job_search api=123456 /] and [job_listing api=123456 job_id=654321 /].

You can technically create a custom page template by duplicating the theme's index.php file and making your changes in the new file, but the amount of customization available to the framework requires the index to be very complex, which is why it hasn't been split into separate files like most themes have.  To separate out all the widget areas alone would end up requiring dozens of files.

If you haven't done shortcodes before, you can see the ones I've created for the framework in the vertex/includes/classes/shortcodes.class.php file.
Logged

Offline boyjpf1
Free Member
Posts: 4
Posted on: December 01, 2015, 01:14:42 PM

Thanks Tristan, I have pondered setting up the system in that way but the amount of customisation each needs makes it a nightmare at present.

I'll play further with the index.php file, I had an hour or so before contacting you initially in the hope there may be a simple way but if there isn't then hey, not a problem.

Thanks for the help.
Logged

Offline Tristan Rineer
Free Member
Posts: 3858
Posted on: December 02, 2015, 09:17:31 AM

I'm glad I was able to help, sorry I couldn't do more.  Let me know if there's anything else you need.
Logged

Offline Tristan Rineer
Free Member
Posts: 3858
Posted on: December 04, 2015, 08:53:43 AM

I was just helping another member with a code adjustment and noticed that they had created a page template for a photo gallery.  After taking a quick look at the code I think I know what you'll need to do for yours.

As we thought, you'll want to make a copy of the index.php.  At that point, just look for the following:
Code:
<?php if ($s5_show_component == "yes") { ?>

Everything within that "if" can be replaced with the custom code you need for your page template.  I would actually recommend just replacing it with an include or require, and having your actual search/listing code in a separate file, just so it's easier for you to edit.

The only other thing you should need to do is put the standard page-template comment at the top of the file.
Logged
[1]

Jump to:  


Powered by SMF | SMF © 2013, Simple Machines
Joomla Bridge by JoomlaHacks.com
Page created in 0.023 seconds with 23 queries.
Need some help getting your site up and running? Be sure to check out our tutorials area, post on the forum or hire us
Send Us An Email
Please send us your questions and we will email you back as soon as we can. Product support questions should be posted in our support forums under the Help menu. Our staff will assist you from there.