Tagged: 

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1220009

    Hi I would like to remove the PERMANENT LINK from the H1 post title? Why even to have a permanent link in the H1 of the very page that the reader is on? Thanks for your help

    #1220012

    do you want to completely remove those links – or is it enough that there was on mouse ( click) interaction.
    the last is easy to obtain – just in quick css:

    #top.single .post-title.entry-title > a {
        pointer-events: none !important;
    }
    
    #top.single .post-entry .post-title:hover {
      opacity: 1 !important;
    }
    #1220018

    Thank, Guenni007! However, I would like to remove the link not just to hide the pointer. Thanks!

    #1220155

    It is a littel bit more than only hiding the pointer – the click event is gone. So no mouse-event anymore. But thats why i asked you if you want to completely remove the link setting on this.

    the helper-post-format.php is responsible for that.
    On line 54ff there is the avia_default_title_filter
    And as a pluggable function you can load it in your child-theme functions.php.

    But difficulty on this is that it rules both – the heading (h2) on blog view and the heading (h1) on single-post.
    So we had to have an if clause here too like on the heading tag above.

    put this in your child-theme functions.php

    function avia_default_title_filter($current_post)
    {
    	if(!empty($current_post['title']))
    	{
    		$default_heading = is_singular() ? 'h1' : 'h2';
    		$args = array(
    					'heading'		=> $default_heading,
    					'extra_class'	=> ''
    				);
    		
    		/**
    		 * @since 4.5.5
    		 * @return array
    		 */
    		$args = apply_filters( 'avf_customize_heading_settings', $args, 'avia_default_title_filter', array( $current_post ) );
    		
    		$heading = ! empty( $args['heading'] ) ? $args['heading'] : $default_heading;
    		$css = ! empty( $args['extra_class'] ) ? $args['extra_class'] : '';
    
    		$output  = "";
    		//$output .= "<{$heading} class='post-title entry-title ". avia_offset_class('meta', false). "'>";
    		$output .= "<{$heading} class='post-title entry-title {$css}' ".avia_markup_helper(array('context' => 'entry_title','echo'=>false)).">";
    		$output .= is_singular() ? $current_post['title'] : "<a href='".get_permalink()."' rel='bookmark' title='". __('Permanent Link:','avia_framework')." ".$current_post['title']."'>".$current_post['title'];
    		$output .= "<span class='post-format-icon minor-meta'></span>";
    		$output .= is_singular() ? '' : '</a>';
    		$output .= "</{$heading}>";
    		$current_post['title'] = $output;
    	}
    	return $current_post;
    }

    it now will have the link on blog view but on single post there is only the h1 without link

    • This reply was modified 4 years, 4 months ago by Guenni007.
    #1220157

    btw: if you have this function on your child-theme functions.php the parent function will not be loaded – because as a pluggble function it looks if it exists etc. pp.

    now if you want to change the heading tag you can now do it directly here :
    $default_heading = is_singular() ? 'h1' : 'h2';
    on blog view the heading tag is set to h2 – on single post it is h1
    change that and you will have the other tags you like.

    on only changing the heading tags we use only that filter : avf_customize_heading_settings
    But since you wanted the changes to that effect, and thus have the function in the Child-Theme, you can also change the Heading-tags here in one go.

    __________
    dear Mods – if there was a more elegant syntax please tell me – i always like to learn something too.

    • This reply was modified 4 years, 4 months ago by Guenni007.
    #1220572

    Hi frankaboutcroatia,

    Did you get it working with Guenni007’s suggestions or do you need more help?

    Best regards,
    Victoria

    #1220770

    Hi Guenni007, thanks a lot for your help! However, this is way too technical for me. I don’t have a child theme so I guess I will just keep it the way it is. I used to use the Genesis framework prior to Enfold and find it much more customizable and user-friendly than Enfold. So, I guess I will look into switching back soon, as I almost had to give up on any customization I wanted to do because it turned to be too technical for me. Anyways, nothing to do with you. Thanks a lot for your kind help.
    vera

    #1220874

    When I install a new theme, I always look directly at how to install the corresponding child theme. With Enfold this is very easy. There is a pre-built one, which you just have to upload via ftp.
    An existing Enfold installation that you have already set up can easily be converted to a child theme.
    I think that the advantages of a child-theme outweigh the few disadvantages of a parent-theme only installation.

    If you need help, let me know.

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