Title: Custom HTML/PHP Post Templates
Author: Stephen AfamO
Published: <strong>22 de desembre de 2016</strong>
Last modified: 9 de juliol de 2017

---

Cerca extensions

Aquesta extensió **no s’ha provat en les darreres 3 versions majors del WordPress**.
Segurament no està mantinguda o suportada, i pot tenir problemes de compatibilitat
quan s’usa en versions recents del WordPress.

![](https://s.w.org/plugins/geopattern-icon/html-php-pages-and-posts.svg)

# Custom HTML/PHP Post Templates

 Per [Stephen AfamO](https://profiles.wordpress.org/stephenafamo/)

[Baixa](https://downloads.wordpress.org/plugin/html-php-pages-and-posts.2.0.0.zip)

 * [Detalls](https://ca.wordpress.org/plugins/html-php-pages-and-posts/#description)
 * [Ressenyes](https://ca.wordpress.org/plugins/html-php-pages-and-posts/#reviews)
 *  [Instal·lació](https://ca.wordpress.org/plugins/html-php-pages-and-posts/#installation)
 * [Desenvolupament](https://ca.wordpress.org/plugins/html-php-pages-and-posts/#developers)

 [Suport](https://wordpress.org/support/plugin/html-php-pages-and-posts/)

## Descripció

This plugin allows you to use any HTML or PHP file as the template for any page 
or post.

Simply upload the file and select it.
 You can upload custom js and css files into
the media library and link to them from the HTML file.

Options:

 * Overwrite All: You overwrite the entire theme and use your custom file
 * Overwrite Content: Keeps the header, footer, sidebar, e.t.c. Simply overwrites
   the body of the page or post
 * Above Content: Your custom content is simply added to the top of the page content
 * Below Content: You custom content is placed just beneath the page content.

#### Adding support for custom post types

By default the pulugin works with pages and posts, however, go to the settings to
enable it on any other registered post type.

use the `hppp_post_types` filter to add more post types.

Like this:

    ```
        public function post_type_modify ($post_types) {
            $post_types[] = 'custom_post_type';
            return $post_types;
        }

        add_filter( 'hppp_post_types', 'post_type_modify' );
    ```

## Instal·lació

 1. Upload `html-php-pages-and-posts` to the `/wp-content/plugins/` directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress

## PMF

  Installation Instructions

 1. Upload `html-php-pages-and-posts` to the `/wp-content/plugins/` directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress

  What about external JS and CSS files?

You can upload it all into the media library. Simply reference them properly in 
the html file.
 e.g. `<link rel='stylesheet' href='http://example.com/wp-content/
2017/01/my_custom_stylesheet.css' type='text/css' />`

  Will template tags work in my custom templates?

Yes.
 All wordpress functions, and any installed plugin function will work if called
properly

  What post types will this work with?

By default, it can only be used by on pages and posts, but you can add any other
post type by hooking into the `hppp_post_types` filter.

## Ressenyes

![](https://secure.gravatar.com/avatar/dd6b1b16bed8b4cfb74969006f1f6b496b6c9d3ef4f018eea261de6a11ab28ba?
s=60&d=retro&r=g)

### 󠀁[just save my life](https://wordpress.org/support/topic/just-save-my-life/)󠁿

 [aladinDr](https://profiles.wordpress.org/aladin007463/) 19 de setembre de 2017
1 resposta

with this plugin i added mmore than 17 custom php for one of my clients without 
scary to fall in 500 error … just good job guys

![](https://secure.gravatar.com/avatar/924ae5210edf116347cd57c370a6bc968a3df28ba6710f3636cd4442859a5af8?
s=60&d=retro&r=g)

### 󠀁[Works like a charm](https://wordpress.org/support/topic/works-like-a-charm-930/)󠁿

 [Stephen AfamO](https://profiles.wordpress.org/stephenafamo/) 19 de gener de 2017

I use this on a couple sites I own and it works wonderfully. I hope you can find
it useful.

 [ Llegiu totes les 2 ressenyes ](https://wordpress.org/support/plugin/html-php-pages-and-posts/reviews/)

## Col·laboradors i desenvolupadors

«Custom HTML/PHP Post Templates» és programari de codi obert. La següent gent ha
col·laborat en aquesta extensió.

Col·laboradors

 *   [ Stephen AfamO ](https://profiles.wordpress.org/stephenafamo/)

[Traduïu «Custom HTML/PHP Post Templates» a la vostra llengua.](https://translate.wordpress.org/projects/wp-plugins/html-php-pages-and-posts)

### Interessats en el desenvolupament?

[Navegueu pel codi](https://plugins.trac.wordpress.org/browser/html-php-pages-and-posts/),
baixeu-vos el [repositori SVN](https://plugins.svn.wordpress.org/html-php-pages-and-posts/),
o subscriviu-vos al [registre de desenvolupament](https://plugins.trac.wordpress.org/log/html-php-pages-and-posts/)
per [fisl de subscripció RSS](https://plugins.trac.wordpress.org/log/html-php-pages-and-posts/?limit=100&mode=stop_on_copy&format=rss).

## Registre de canvis

#### 2.0.0

 * Add settings page to enable support for any registered post type
 * Allow users to set default template for any registered post type

#### 1.1.0

 * Add filter hook to modify supported post_types

#### 1.0.0

 * First release

## Meta

 *  Versió **2.0.0**
 *  Darrera actualització **fa 9 anys**
 *  Instal·lacions actives **60+**
 *  Versió del WordPress ** 3.0.1 o posterior **
 *  Provada fins a **4.8.28**
 *  Idioma
 * [English (US)](https://wordpress.org/plugins/html-php-pages-and-posts/)
 * Etiquetes
 * [custom pages](https://ca.wordpress.org/plugins/tags/custom-pages/)[custom posts](https://ca.wordpress.org/plugins/tags/custom-posts/)
   [custom templates](https://ca.wordpress.org/plugins/tags/custom-templates/)[html](https://ca.wordpress.org/plugins/tags/html/)
   [php](https://ca.wordpress.org/plugins/tags/php/)
 *  [Vista avançada](https://ca.wordpress.org/plugins/html-php-pages-and-posts/advanced/)

## Valoracions

 5 sobre 5 estrelles.

 *  [  2 valoracions de 5 estrelles     ](https://wordpress.org/support/plugin/html-php-pages-and-posts/reviews/?filter=5)
 *  [  0 valoracions de 4 estrelles     ](https://wordpress.org/support/plugin/html-php-pages-and-posts/reviews/?filter=4)
 *  [  0 valoracions de 3 estrelles     ](https://wordpress.org/support/plugin/html-php-pages-and-posts/reviews/?filter=3)
 *  [  0 valoracions de 2 estrelles     ](https://wordpress.org/support/plugin/html-php-pages-and-posts/reviews/?filter=2)
 *  [  0 valoracions de 1 estrelles     ](https://wordpress.org/support/plugin/html-php-pages-and-posts/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/html-php-pages-and-posts/reviews/#new-post)

[Visualitzeu totes les ressenyes](https://wordpress.org/support/plugin/html-php-pages-and-posts/reviews/)

## Col·laboradors

 *   [ Stephen AfamO ](https://profiles.wordpress.org/stephenafamo/)

## Suport

Teniu quelcom a dir? Necessiteu ajuda?

 [Visualitza els fòrums de suport](https://wordpress.org/support/plugin/html-php-pages-and-posts/)

## Feu una donació

Voleu ajudar a què l’extensió millori?

 [ Feu una donació a aquesta extensió ](http://stephenafamo.com)