Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I am currently trying to change der Avada portfolio grid title markup. Right now it is wrapped in <h2> tags, but I want it to be a plain <a> tag. I found the fusion_portfolio_grid_title filter, but I really dont get it to work. What I tried:

add_filter( 'fusion_portfolio_grid_title', 'change_grid_title');
function change_grid_title() {
    $post_title = '<a>' $post_title '</a>';
    return = $post_title;
}; 

Can somebody help out?

question from:https://stackoverflow.com/questions/66051188/change-avada-fusion-portfolio-grid-title-html-markup

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
156 views
Welcome To Ask or Share your Answers For Others

1 Answer

function change_grid_title( $post_title ) {
    $post_title = strip_tags($post_title, '<a></a>');
    return $post_title;
};
add_filter( 'fusion_portfolio_grid_title', 'change_grid_title');

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...