YOOtheme Pro is here! The best WordPress and Joomla theme. Learn more

Override system files

This tutorial shows you how to override system files in Joomla, WordPress and create custom pages in WordPress.

Override Joomla system files

Let's say you want to customize the layout of the content Joomla component. To do so, just copy the com_content directory from /warp/systems/joomla.1.x/layouts to the theme /layouts directory or even better create your own style and change the files to your needs. If you are using your own style, copy the directory to /styles/YOUR_STYLE/layouts. Further this way you won't lose any of your changes after an update of your theme. Make sure to only copy the files you want to change, all other layout files will be loaded automatically from the system defaults.

Override WordPress system files

All warp system layout files for WordPress are located in /warp/systems/wordpress/layouts. So if you want to add some modification to let's say the comments markup, just copy /warp/systems/wordpress/layouts/comments.php to the theme /layouts directory or create your own style and copy comments.php to /styles/YOUR_STYLE/layouts. This is the most warp proof and recommended method.

Custom Pages

You can use different layouts for pages by creating files in your theme folder with a "page-" as prefix in the name followed by the ID or page-slug.

  • page-{id}.php
  • page-{slug}.php

Let's say you want a custom content for a page with ID 80. Create a file in your theme folder and name it page-80.php with the following content.

<?php get_header(); ?>

Put your content here...

<?php get_footer(); ?>

In the backend you can even assign a custom style to the page, so you'll get a completely different look.

All the common template layout overrides work. Learn more about them in the WordPress documentation.

Documentation on Github

Help us out! If you are feeling that our documentation has errors or can be improved, fork it at Github and send us a pull request. Any contribution is much appreciated. Thank you!