Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add subtitle support for terms. #51

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Add subtitle support for terms. #51

wants to merge 4 commits into from

Conversation

benhuson
Copy link
Owner

Includes API for display term subtitles (based on term ID) and archive subtitles (displayed for taxonomy term pages):

// Example: Display term subtitle
do_action( 'plugins/wp_subtitle/the_term_subtitle', array(
   'before'        => '<p class="subtitle">',  // Before subtitle HTML output (default empty string)
   'after'         => '</p>',                  // After subtitle HTML output (default empty string)
   'term_id'       => 0,                       // Term ID (default to none)
   'default_value' => ''                       // Default output (if no subtitle)
) );

// Example: Get term subtitle display
$subtitle = apply_filters( 'plugins/wp_subtitle/get_term_subtitle', '', array(
   'before' => '<p class="subtitle">',  // Before subtitle HTML output (default empty string)
   'after'  => '</p>',                  // After subtitle HTML output (default empty string)
   'term_id' => 0                       // Term ID (default to none)
) );

// Example: Display archive subtitle
do_action( 'plugins/wp_subtitle/the_archive_subtitle', array(
   'before'        => '<p class="subtitle">',  // Before subtitle HTML output (default empty string)
   'after'         => '</p>',                  // After subtitle HTML output (default empty string)
   'default_value' => ''                       // Default output (if no subtitle)
) );

// Example: Get archive subtitle display
$subtitle = apply_filters( 'plugins/wp_subtitle/get_archive_subtitle', '', array(
   'before' => '<p class="subtitle">',  // Before subtitle HTML output (default empty string)
   'after'  => '</p>',                  // After subtitle HTML output (default empty string)
) );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant