WordPress.org

Forums

Gallery by BestWebSoft
[resolved] Display gallery's title in post (2 posts)

  1. smumdax
    Member
    Posted 2 years ago #

    A gallery in it's own page has a title. But when we insert that gallery via the shortcode inside an existing post, the title does not appear. How can I do that ?

    http://wordpress.org/extend/plugins/gallery-plugin/

  2. bestwebsoft
    Member
    Plugin Author

    Posted 2 years ago #

    Hello smumdax,

    You can edit the file gallery-plugin.php.
    Please find code, which is started from 1067 string
    if ( $second_query->have_posts() ) :
    while ( $second_query->have_posts() ) :
    global $post;
    $second_query->the_post(); ?>
    <div class="gallery_box_single">
    <?php the_content();

    and add there the string:
    if ( $second_query->have_posts() ) :
    while ( $second_query->have_posts() ) :
    global $post;
    $second_query->the_post(); ?>
    <h3><?php echo $post->post_title; ?></h3>
    <div class="gallery_box_single">
    <?php the_content();

    This change will add the displaying of a gallery title when you insert shortcode [print_gllr id=1622].
    But, please note, when you will update the plugin these changes will be removed and you should add them again.

    Kind regards.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Gallery by BestWebSoft
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.