For a few hours I try to show a message only if there is a gallery Picu, without success, an idea?
Have try this code, but not work:
/**
* galeries content
*/
function iconic_galeries_endpoint_content() {
echo /* Template Name: Client Area */
get_header();
?>
<div id="primary" class="content-area">
<main id="main" class="site-main">
<section>
<header class="entry-header">
<h1><?php _e( 'Photos gallery.', 'my-theme' ); ?></h1>
</header>
<article>
<div class="entry-content">
<?php
$current_user = wp_get_current_user();
if ( isset( $current_user->user_email ) ) {
echo '<p>' . sprintf( __( '%s, here is your client area', 'my-theme' ), $current_user->display_name ) . ':</p>';
if($output == '<li class="picu-status-' . get_post_status() . '"><a href="' . get_permalink() . '">' . get_the_title() . '</a></li>') echo '<div class="woocommerce-MyAccount-content">
<div class="woocommerce-notices-wrapper"></div>
<div class="woocommerce-Message woocommerce-Message--info woocommerce-info">
Your gallery. </div>
</div>';
else echo $output;
$output = do_shortcode( '[picu_list_collections email="' . $current_user->user_email . '"]' );
// the shortcode returns an empty <ul> tag, if there is no gallery
// https://plugins.trac.wordpress.org/browser/picu/trunk/frontend/includes/picu-template-functions.php#L464
if($output == '<ul class="picu-collection-list"></ul>') echo '<div class="woocommerce-MyAccount-content">
<div class="woocommerce-notices-wrapper"></div>
<div class="woocommerce-Message woocommerce-Message--info woocommerce-info">
There is no gallery. </div>
</div>';
else echo $output;
}
?>
</div>
</article>
</section>
</main>
</div>
<?php
}
Thanks in advance Nico
$output
first set? It looks like your are checking the value before it's set in your example code. Perhaps you needdo_shortcode()
at the beginning of your function.