audi63
Membre 🏅
Torrents Stats
- Partagées
- 130 Go
- Téléchargées
- 0 bytes
- Ratio
- -
- Messages
- 3
- J'aime
- 0
- Trophées
- 5
- Inscrit
- 22 Décembre 2021
Bonjour,
J'utilisais ce plugin depuis des années jusqu'à ce que son développeur cesse de le mettre à jour, et que l'un de mes sites web se trouve bloqué par une vilaine erreur.
J'ai donc résolu le problème et adapté le code afin de le rendre compatible avec PHP 8.0+
Pour information, il n'est plus téléchargeable sur Wordpress.org, et la version sur le site du développeur est obsolète puisque plus mise à jour.
URL d'origine : https://wordpress.org/plugins/improved-include-page/
Le readme.txt a été mis à jour.
++ Johan
Sources du plugin :
Improved Include Page (IIP) allows you to use a shortcode to include the content of any page inside any other page or post. This makes it easier to manage content that needs to be published in multiple pages.
You can download this plugin here.
You can include a page's content in a page/post using the syntax:
[include-page id=”123″]
or
[include-page id=”3″ displayTitle=”true” displayStyle=”DT_TEASER_MORE” titleBefore=”<h3>” titleAfter=”</h3>” more=”continue»”]
Example 2: basic usage in templates
If you wish to include the content of page number ‘4' insert the following code into your template file (e.g. sidebar.php):
or
<?php echo iinclude_page(4, null, true); ?>
In order to avoid PHP errors if the plugin is disabled, you should use the function with the following syntax:
<?php if( function_exists( ‘iinclude_page' ) ) iinclude_page( 4 ); ?>
Example 3: using optional parameters in templates
You can also display the page title using the following code:
<?php iinclude_page( 4, ‘displayTitle=true&titleBefore=<h2 class=”sidebar-header”>' ); ?>
J'utilisais ce plugin depuis des années jusqu'à ce que son développeur cesse de le mettre à jour, et que l'un de mes sites web se trouve bloqué par une vilaine erreur.
J'ai donc résolu le problème et adapté le code afin de le rendre compatible avec PHP 8.0+
Pour information, il n'est plus téléchargeable sur Wordpress.org, et la version sur le site du développeur est obsolète puisque plus mise à jour.
URL d'origine : https://wordpress.org/plugins/improved-include-page/
Le readme.txt a été mis à jour.
Contenu masqué
Vous devez aimer ce post pour à accéder à ce contenu.
Contenu masqué
Vous devez aimer ce post pour à accéder à ce contenu.
++ Johan
Sources du plugin :
Improved Include Page (IIP) allows you to use a shortcode to include the content of any page inside any other page or post. This makes it easier to manage content that needs to be published in multiple pages.
You can download this plugin here.
Plugin Features Include
- Page title can be displayed with optional HTML code.
- Content can be displayed with different styles (full, teaser, custom ‘more' link).
- WordPress filters are applied to both the content and the title.
- Supports the WordPress Shortcode API.
Parameters
The current version supports the following parameters:- displayTitle (boolean) toggle title display
- titleBefore/titleAfter (string) string to display before and after the title
- displayStyle (integer constant) one of the following:
- DT_TEASER_MORE – Teaser with ‘more&' link (default)
- DT_TEASER_ONLY -Teaser only, without ‘more' link
- DT_FULL_CONTENT – Full content including teaser
- DT_FULL_CONTENT_NOTEASER – Full content without teaser
- more (string) text to display for the ‘more' link
Examples
Example 1: using Shortcode API in posts or pagesYou can include a page's content in a page/post using the syntax:
[include-page id=”123″]
or
[include-page id=”3″ displayTitle=”true” displayStyle=”DT_TEASER_MORE” titleBefore=”<h3>” titleAfter=”</h3>” more=”continue»”]
Example 2: basic usage in templates
If you wish to include the content of page number ‘4' insert the following code into your template file (e.g. sidebar.php):
or
<?php echo iinclude_page(4, null, true); ?>
In order to avoid PHP errors if the plugin is disabled, you should use the function with the following syntax:
<?php if( function_exists( ‘iinclude_page' ) ) iinclude_page( 4 ); ?>
Example 3: using optional parameters in templates
You can also display the page title using the following code:
<?php iinclude_page( 4, ‘displayTitle=true&titleBefore=<h2 class=”sidebar-header”>' ); ?>