Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #483414

    Dear support

    How can I remove the permanent link from an article’s title?

    Thank you

    #483560

    Hi Gurify!

    Add this to the bottom of your functions.php file.

    add_filter('avf_title_args', 'enfold_customization_post_title', 10, 2);
    function enfold_customization_post_title($args,$id)
    {
         if ( is_single() ) {
            $args['link'] = false;
         }
        return $args;
    }

    Best regards,
    Elliott

    #483838

    Hi there

    I added the code at the end of my functions.php file located in my child theme but it didnt remove the permanent link. What could be wrong?

    Thank you!
    Andrea

    #484042

    Hi!

    Oh sorry, that’s for the title in the breadcrumbs. For the title your referring to try adding this to the bottom of your functions.php file.

    if(!function_exists('avia_default_title_filter'))
    {
    	function avia_default_title_filter($current_post)
    	{
    		if(!empty($current_post['title']))
    		{
    			$heading = is_singular() ? "h1" : "h2";
    	
    			$output  = "";
    			//$output .= "<{$heading} class='post-title entry-title ". avia_offset_class('meta', false). "'>";
    			$output .= "<{$heading} class='post-title entry-title' ".avia_markup_helper(array('context' => 'entry_title','echo'=>false)).">";
    			$output .= $current_post['title'];
    			$output .= "			<span class='post-format-icon minor-meta'></span>";
    			$output .= "</{$heading}>";
    	
    			$current_post['title'] = $output;
    		}
    
    		return $current_post;
    	}
    }

    Regards,
    Elliott

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.