Change HTML output using the included Filter
-
I’m struggling to see how to correctly implement your included filter.
I’m simply trying to change the output of the HTML to wrap the title in a span tag.
Currently I’m trying to do that like this:
// Custom Document Display function dg_doc_icon( $icon, $id ){ return '<div class="document-icon"><a href="'.$icon->link.'">awesome'.$icon.'<span class="document-title">'.get_the_title($icon).'</span></a></div>'; } add_filter( 'dg_doc_icon', 'dg_doc_icon', null, 2 );
Can you please explain how to access the URL, icon, and title? Thanks.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Change HTML output using the included Filter’ is closed to new replies.