Home Forums Academy Modify custom post titles

Modify custom post titles

  • habland

    Hi Themex

    Currently, in your Academy theme I’m adding an icon to post titles by category as follows:


    add_action( ‘the_title’, ‘addLock’, 10, 2 );

    function addLock( $title, $post_id ) {

    if (! current_user_can(‘edit_posts’)) {

    if( has_category( 35, $post_id ) ) {

    $title = ‘<i style=”margin-right: 1px; color: #BEDB39″ class=”fa fa-lock” aria-hidden=”true”></i><span class=”title-1″> ‘ . $title;


    return $title;
    echo “</span>”;



    I’ve tried many variations using online examples, but I can’t seem to find the right way to filter in Academy custom post types (namely, courses and lessons).

    Any help modifying the above to filter for course and lesson post types would truly save me from madness!

    ihor Staff

    Please sign in or register to view replies from the support staff.


    Awesome, thanks; that works perfectly. Exactly what I was after 😀

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.