Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Evan Herman

    (@eherman24)

    Hi,

    The front end uses the built in WordPress function the_excerpt, which by nature, strips all HTML elements from the excerpt.

    You can implement HTML excerpts if this is something that you need. I would recommend taking a look at the following documentation artlce, along with some other support forum threads:

    Docs:
    http://www.wp-timelineexpress.com/documentation/enable-html-excerpts/

    Thread:
    https://wordpress.org/support/topic/121-broke-some-functionality?replies=9

    Thanks!
    Evan

    Thread Starter linkus100

    (@linkus100)

    Thank you, Evan, for quick replay.

    But i did all from this link http://www.wp-timelineexpress.com/documentation/enable-html-excerpts/ and nothing changed. At first i added the Metabox and checked. It hasn’t appeared in wp admin. Then i added code for Replacing the Default Excerpt. The same result. I use Divi theme and added these two php functions in function.php.

    Thank you!

    Plugin Author Evan Herman

    (@eherman24)

    Where are you adding the code snippet? Is it going into your theme functions.php? Is there a special location for it in the divi theme?

    Once you add the following snippet, you should at least be seeing a new metabox appear on the edit/new announcement page:

    /**
     * Timeline Express Add Custom Metabox
     * @param array $options Array of options for Timeline Express.
     */
    function define_custom_excerpt_metabox( $options ) {
        $announcement_custom_metabox = new_cmb2_box( array(
           'id' => 'custom_meta',
           'title' => __( 'Announcement Custom Excerpt', 'text-domain' ),
           'object_types' => array( 'te_announcements' ), // Post type
           'context' => 'advanced',
           'priority' => 'high',
           'show_names' => true, // Show field names on the left
        ) );
        // Container class
        $announcement_custom_metabox->add_field( array(
           'name' => __( 'Custom Excerpt', 'text-domain' ),
           'desc' => __( 'Enter the custom excerpt for this announcement in the field above.', 'text-domain' ),
           'id' => 'announcement_custom_excerpt',
           'type' => 'wysiwyg',
        ) );
    }
    add_action( 'timeline_express_metaboxes', 'define_custom_excerpt_metabox' );

    When you add that, and save the file – the new metabox should appear on the edit / new page – if it doesn’t it may be that the file you are editing is incorrect.

    As a follow up – are you using the latest version of the plugin? Version 1.2.2?

    I am not familiar with the Divi theme – I know that they have a page builder – but I’m not entirely sure how it works.

    Thanks,
    Evan

    Thread Starter linkus100

    (@linkus100)

    Yes, it works.

    When i added “define_custom_excerpt_metabox” function i got another field “Custom Excerpt”. By the way when i added replace_default_timeline_express_excerpt function i still see two fields but it’s not too important for me.

    Thank you for help.

    Plugin Author Evan Herman

    (@eherman24)

    Hello,

    That is correct.

    As the screenshot indicates – one field is for the content the other is for a custom excerpt.

    You cannot generate an excerpt from the content – without writing your own function to do so. The documentation states that you will be adding a secondary field to enter your own custom excerpt into.

    Thanks,
    Evan

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Bold font for particular word’ is closed to new replies.