• Resolved lchabolla

    (@lchabolla)


    Hello,

    I’m looking for the best way to remove or replace the text preceding the $title on the author pages (“Articles by:”) that would carry across updates. I tried using the filter below as an example, but I can’t find the right way to target that text. Any tips would be appreciated.

    The filter below replaces the $title which would be the authors name to Home but looking for a way to replace/remove the text before the $title.

    add_filter('bcn_breadcrumb_title', 'my_breadcrumb_title_swapper', 3, 10);
    function my_breadcrumb_title_swapper($title, $type, $id)
    {
        if(in_array('author', $type))
        {
            $title = __('Home');
        }
    
        return $title;
    }
    
    • This topic was modified 5 years, 10 months ago by lchabolla.
    • This topic was modified 5 years, 10 months ago by lchabolla.
    • This topic was modified 5 years, 10 months ago by lchabolla.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author John Havlik

    (@mtekk)

    If you’re just trying to remove the “Articles by:” text, it’s probably easier to go in the Breadcrumb NavXT settings, and under the Miscellaneous tab, edit the “Author Template (Unlinked)” and “Author Template”. Remove the “Articles by:” from both, and then press the “Save Changes” button on the bottom of the page.

    Thread Starter lchabolla

    (@lchabolla)

    Thanks John! I completely overlooked that in the settings. Much appreciated! At least I learned how to create a custom filter. Thanks again.

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

The topic ‘Remove “Articles by:” on Author template’ is closed to new replies.