Article updated 4 February 2020 at 5 h 39 me


How to integrate Piwigo with WordPress to & rsquo; with a alias apache and a iframe.

Writing FI to work today has found how to integrate Piwigo (logithèques d'imagerie website) avec WordPress sous un autre dossier que le site principal.
Compliqué mais simple après recherche.



You will need to create a child page to link to your gallery Piwigo.
The link to the file will be obligatory with alias to add to the httpd.conf of your Apache server.
The integration of Piwigo starting from a different folder using d & rsquo; a iframe is obligatory
unless you want to mix the records WordPress your website with that of Piwigo
not recommend for a good use of your website and the gallery.
It is important to compartmentalize sections by some module that can require of your data backup resource.
The functions of WordPress and piwigo may not be integrated directly.
To display the entire page in your gallery while keeping the site's features,
you have to change the child page (via your preferred editor),
Delete the get header, replace manually by copying a few lines calling functions WordPress that is found at the beginning of the file header.php your theme.

template name: galerie
?> <!DOCTYPE html>
<html <?php language_attributes(); ?>><head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="profile" href="">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
<?php wp_head(); ?>


We now search function single.php, one displaying the article.
Copy and paste this party and finish with footer.php.
Example based on the themes GridWP

<article id="post-<?php the_ID(); ?>" <?php post_class('gridwp-post-singular gridwp-box'); ?>>
<div class="entry-content clearfix">
the_content( sprintf(
/* translators: %s: Name of current post. Only visible to screen readers */
__( 'Continue reading<span class="screen-reader-text"> "%s"</span> <span class="meta-nav">&rarr;</span>', 'gridwp' ),
'span' => array(
'class' => array(),
) );

wp_link_pages( array(
'before' => '<div class="page-links"><span class="page-links-title">' . esc_html__( 'Pages:', 'gridwp' ) . '</span>',
'after' => '</div>',
'link_before' => '<span>',
'link_after' => '</span>',
) );
</div><!-- .entry-content -->

<footer class="entry-footer">
<?php edit_post_link( esc_html__( 'Edit', 'gridwp' ), '<span class="edit-link">', '</span>' ); ?>
</footer><!-- .entry-footer -->



<?php get_footer(); ?>




To create an iframe, copied some line in the WordPress page editorial text box.
We have included javascript for not double vertical scrolling while keeping the option of scrolling.

<script type="text/javascript">
function resizeIframe(obj){ = 0; = obj.contentWindow.document.body.scrollHeight + 'px';
<iframe src="" frameborder="0" width="100%" onload="resizeIframe(this)"></iframe>


The result of this Iframe you will display your gallery in full screen.
Example below contained in the DIV our article on functional gallery our website.



A problem observed in other language navigation whether using the plugin Transposh and a alias as a navigation link, it adds the edit link and thus affects redirection.
Solved by adding <span class=&quot;no_translate&quot;> and </span> like this.

<script type="text/javascript">
function resizeIframe(obj){ = 0; = obj.contentWindow.document.body.scrollHeight + 'px';
<span class="no_translate"><iframe src="" frameborder="0" width="100%" onload="resizeIframe(this)"></iframe></span>

Hopefully this tutorial will help people in difficulty.
Do not hesitate to make us leave your comment to improve writing.

4.0 rating
4 / 5 star (1 view)
Very good100%



Rate this article

Very good and functional ..! BRAVO

4.0 rating
20 January 2020

2 thoughts on “Piwigo integrate with wordpress

  1. Definitely imagine that which you stated. Your favourite
    justification appeared to be at the net the easiest factor to be
    aware of. I say to you, I definitely get annoyed even as people consider concerns that they plainly do not realize
    about. You managed to hit the nail upon the top and also outlined out the entire thing with no need side-effects ,
    other folks could take a signal. Will likely be back to get more.

  2. Greetings from Florida! I’m bored to death at work so I decided to
    browse your site on my iphone during lunch break. I love the info you provide here and can’t wait to take a look when I get home.
    I’m surprised at how fast your blog loaded on my cell phone ..
    I’m not even using WIFI, just 3G .. Anyhow, wonderful blog!

Leave a Reply

Your email address will not be published. Required fields are marked *