Kees Sonnema
Kees Sonnema

Reputation: 5784

How to edit plugin to use the theme's template files

I am using a theme called Hemingway, it's a great theme with three page layouts. (full-width, with sidebar, without sidebar). This is all working great. I can choose one of three options in page settings.

Page layout template

I'm also using the Projects plugin by Woothemes. This plugin makes it easy to add recent projects with a photo gallery and some other options. It's working when I'm using the shortcode:

[projects limit="12" columns="2" orderby="date" order="desc" exclude_categories=""]

I'm using this shortcode with two columns on a full-width template. This is working great, but when I'm trying to use the functionality to automatically add the content of projects to the page using the option built-in Projects: projects settings The full-width template is not working and the sidebar is shown. Also the two column layout for projects is not working. They just aligned beneath eachother.


How it should look like (this example is with shortcodes):

http://hoveniersbedrijfameland.nl/projecten/

How it looks with the option in projects to choose a page: (this is wrong)

http://hoveniersbedrijfameland.nl/projects/


How can I debug this to see what breaks it?

What I tried so far:

  1. I've tried the plugin to behave like I want. This means, that the plugin will use the full page template for 'categories' instead of using the archive page. I don't really know how the plugin is build, so it's hard to eit the right file.
  2. I've tried a workaround with url routing, but this isn't the best approach.

Upvotes: 9

Views: 282

Answers (1)

Kees Sonnema
Kees Sonnema

Reputation: 5784

I found a solution. I copied the archive-project.php file to my theme and edited the content with the ones in the full-width template. I need to style it myself because the pages are broken if I leave it like that.

If I want to edit page template now, I need to code it in the ffile instead of choosing it from the pages > page layout in the admin panel. I'll fix that later.

FINAL UPDATE: I hardcoded everything and it's working for me now. I don't need any further help, I'm now looking into the custom post types to change the content template.

Upvotes: 3

Related Questions