• Salut Visiteur ! ✌
    Découvre nos partenaires officiels avec VeryLeak's. Des choix réfléchis, dignes de confiance pour tes avantages.

    StoryFound | REFUNDER TEAM

    StoryFound

    Rejoindre le Canal ✨ ou Plus d'information 📃

    Une question ? Rejoingnez nos différents canaux (Discord, Telegram, Revolt)

    Nos Canaux Communautaires

    Cet affichage peut se clôturer définitivement via la croix en haut à droite.

Improved-include-page

audi63

Membre 🏅

Torrents Stats

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.

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 pages
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”>' ); ?>
 

audi63

Membre 🏅

Torrents Stats

Messages
3
J'aime
0
Trophées
5
Inscrit
22 Décembre 2021
Bonsoir,

C'est ma première insertion, publication et mon premier partage de plugin. J'espère donc n'avoir pas fait d'erreur ;)

Ce plugin est libre d'être modifié et partagé. "Improved Include Page" est toujours un logiciel open source.

Amusez-vous bien, sous Wordpress
 
Haut Bas