Thanks so much Phil, I think I’m on the right track now. But I’m still having some trouble with the code. What exactly should I remove from it?
Here is the code from my side:
**
* Remove links from entry titles (shortcodes)
*
*/
function oxygen_entry_title_shortcode( $title ) {
global $post;
if ( is_front_page() && !is_home() ) {
$title = the_title( '<h2 class="' . esc_attr( $post->post_type ) . '-title entry-title"><a href="' . get_permalink() . '" title="' . the_title_attribute( 'echo=0' ) . '" rel="bookmark">', '</a></h2>', false );
} elseif ( is_singular() ) {
$title = the_title( '<h1 class="' . esc_attr( $post->post_type ) . '-title entry-title">', '</h1>', false );
} elseif ( 'link_category' == get_query_var( 'taxonomy' ) ) {
$title = false;
} else {
$title = the_title( '<h2 class="entry-title"><a href="' . get_permalink() . '" title="' . the_title_attribute( 'echo=0' ) . '" rel="bookmark">', '</a></h2>', false );
}
/* If there's no post title, return a clickable '(Untitled)'. */
if ( empty( $title ) && !is_singular() && 'link_category' !== get_query_var( 'taxonomy' ) )
$title = '<h2 class="entry-title no-entry-title"><a href="' . get_permalink() . '" rel="bookmark">' . __( '(Untitled)', 'origin' ) . '</a></h2>';
return $title;
}
Sorry for asking all these questions, but I really need your help.
Thanks