Reading time outputting % minutes for all posts
-
Hi, thank you for this life saving plugin!
I am using the shortcode within a small soliloquy plugin addon which is causing it to output 5 minutes for all posts. Does some variable need to be passed into this plugin to read the rt_reading_time? code below. Many thanks.
Frank<?php /** * Plugin Name: Soliloquy - Display Post Age & Read Time * Plugin URI: https://soliloquywp.com * Version: 1.0 * Author: Soliloquy Team * Author URI: https://soliloquywp.com * Description: Adds the Published Date, Author and Taxonomy Terms for Featured Content slides */ function sol_soliloquy_fc_date_terms( $content, $post, $data ) { // Start Config $sliderSlugs = array( 'beauty', 'fashion', 'interiors', 'gloss-live', 'events', 'mindourselves', ); // Check slider ID is the one we want to amend if ( ! in_array( $data['config']['slug'], $sliderSlugs ) ) { return $content; } // Build date and taxonomy terms content $additional_content = '<div class="soliloquy-fc-date">' . __( '', 'soliloquy-featured-content-date-terms' ) . get_the_date( 'dS F Y', $post->ID ) . "<span>" . " BY " . "</span>" . "<br>" . "<span class='slide-author'>" . get_the_author() . "</span>" . ' </div>' . '<div class="read-time">' . do_shortcode('[rt_reading_time label="" postfix="minute read" postfix_singular="minute read"]') . '</div>'; // Return content return $additional_content . $content; } add_filter( 'soliloquy_fc_caption', 'sol_soliloquy_fc_date_terms', 1, 3 );
The page I need help with: [log in to see the link]
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Reading time outputting % minutes for all posts’ is closed to new replies.