WordPress.org

Forums

KIA Subtitle
[resolved] Ticker and subtitle (3 posts)

  1. namnamir
    Member
    Posted 1 year ago #

    Hey,

    Thanks for fantastic plugin :) I need this for a kind of news website. They sometimes have ticker, title and subtitle. I can use this as subtitle but I don't know how to use it as ticker.
    In addition I wanna know how to add a ticker field in post.

    https://wordpress.org/plugins/kia-subtitle/

  2. helgatheviking
    Member
    Plugin Author

    Posted 1 year ago #

    I'm sorry, I can't support custom implementations. However, you can echo the subtitle anywhere you like. Within a loop all you have to do is:

    if( function_exists( 'the_subtitle' ) ) the_subtitle();

    Or outside of a loop, to get the subtitle of a particular post id

    if( function_exists( 'get_the_subtitle' ) ) echo get_the_subtitle($post_id);
  3. namnamir
    Member
    Posted 1 year ago #

    Thanks.

    I've used these codes before the title in theme's post php file to use this feature:

    // The Ticker -> Before the main title
    <h3 class="entry-ticker">
    	<?php
    	     $Ticker_value = get_post_meta( get_the_ID(), 'Ticker', true );
    	     if( ! empty( $Ticker_value ) )
    	     { echo $Ticker_value; }
    	?>
    </h3>

    If someone don't like to use any addition plugin can add this part of code to where s/he like as subtitle. I've added it after the main title:

    // The Subtitle -> After the main title
    <h3 class="entry-subtitle">
    	<?php
    	     $Subtitle_value = get_post_meta( get_the_ID(), 'Subtitle', true );
    	     if( ! empty( $Subtitle_value ) )
    	     { echo $Subtitle_value; }
    	?>
    </h3>

    in addition I added these codes to CSS file. You can customize it as you'd like :(

    h3.entry-ticker {font-size: 70%;}
    h3.entry-subtitle {font-size: 70%;}

    Now, just add two custom fields to the post that you like have ticker of subtitle. Name the fields "Subtitle" and "Ticker".

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • KIA Subtitle
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic