• Resolved studiopie

    (@studiopie)


    Hi, thanks for creating and maintaining this awesome theme.

    I’m wondering about the post subtitle, which you mention briefly here. I was looking into modifying it so that it would be added to the post cover if you have that option turned on.

    Then, when I opened the template-tags.php file (where the post cover code is), I realized that there’s already something that looks like it trying to call the subtitle, right under the post title.

    <h1 class="entry-title p-name" itemprop="name">
        <?php echo get_the_title(); ?>
    </h1>
    <?php $subtitle = get_post_meta( get_the_id(), 'independent_publisher_post_cover_subtitle', true ); ?>
    <?php if ( $subtitle ): ?>
        <h2 class="entry-subtitle">
            <?php echo $subtitle; ?>
        </h2>
    <?php endif; ?>

    However, if I add a subtitle in the way you describe, to a page with a post cover, it still just shows up as an h2 at the top of the post content. Any thoughts? Is this supposed to work, but I’m doing something wrong?

    Thanks,
    James

Viewing 5 replies - 1 through 5 (of 5 total)
  • Theme Author Raam Dev

    (@raamdev)

    @studiopie I just tested this and it’s working for me. You need to make sure that “Overlay Post Title on Post Cover” is enabled in the General Options inside the theme Customizer. Then you need to add a Custom Field to the post with the key independent_publisher_post_cover_subtitle and the value set to your Subtitle.

    See the three screenshots here: https://cloudup.com/ixQoUW49_OH

    Thread Starter studiopie

    (@studiopie)

    Awesome, thanks for the quick reply.

    Just curious, do you know if using Advanced Custom Fields and adding a field with that key would do the same thing as adding it with the built-in custom fields?

    Thanks,
    James

    Theme Author Raam Dev

    (@raamdev)

    @studiopie I’m not sure, but I don’t think that will work. We had to build in specific support for ACF related to categories (see https://github.com/raamdev/independent-publisher/pull/122) so my guess is that a similar integration will be necessary to allow showing the subtitle with ACF.

    If you want to open a GitHub issue, it will get added to the todo list, but honestly I’m a bit busy right now with other projects so I can’t make any promises about when it will get worked on.

    Thread Starter studiopie

    (@studiopie)

    I just installed ACF, added a field for posts named independent_publisher_post_cover_subtitle, removed the old built-in custom field on one of my posts, added some text to the ACF field…and voila, it works!

    Thanks!

    Theme Author Raam Dev

    (@raamdev)

    @studiopie Awesome! That’s good to know. ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Subtitle’ is closed to new replies.