wecobble / Subtitles

Add subtitles into your WordPress posts, pages, custom post types, and themes. No coding required. Simply activate Subtitles and you're ready to go.
http://wordpress.org/plugins/subtitles/
GNU General Public License v2.0
117 stars 186 forks source link

the_subtitle logic check #92

Closed arraypress closed 7 years ago

arraypress commented 7 years ago

I am using the following code in my theme:

if ( function_exists( 'the_subtitle' ) ) {
    the_subtitle( '<p class="entry-subtitle">', '</p>' );
}

However this dosen't take into account if the subtitle actually exists (i.e. contains data), is there a function or way of checking this before processing other than checking the post meta?

philiparthurmoore commented 7 years ago

Hi David. That actually takes place inside of the plugin already. Nothing should ever return to the screen unless the post meta exists. Are you seeing otherwise?

Philip Arthur Moore CEO @ Professional Themes (https://professionalthemes.nyc/) philip@professionalthemes.nyc Facebook (https://www.facebook.com/ProThemesNYC/) / Twitter (https://twitter.com/ProThemesNYC) / Press Build (https://pressbuild.blog/) US: +1-832-632-7465 (tel:+1-832-632-7465) VN: +84-0169-525-7591 (tel:+84-0169-525-7591)

On Jun 5, 2017, 04:50 +0700, David Sherlock notifications@github.com, wrote:

I am using the following code in my theme:

if ( function_exists( 'the_subtitle' ) ) { the_subtitle( '

', '

' ); }

However this dosen't take into account if the subtitle actually exists (i.e. contains data), is there a function or way of checking this before processing other than checking the post meta?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub (https://github.com/professionalthemes/Subtitles/issues/92), or mute the thread (https://github.com/notifications/unsubscribe-auth/AABwDA3Kh7T87Jg8LYa1TncFvWJj1t2rks5sAyatgaJpZM4NvgN5).

.

.

philiparthurmoore commented 7 years ago

Feel free to open again when ready. Thanks.