badget

Biggest Sale! Special Offer!

Get 30% discount on all of our single themes with this coupon code: #30%SALE

Hurry up! *Limited time offer*

Remove links from head slider image

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #22626
    julie.pett
    Participant

    Hello, How do I remove the url links to the post page from my slider images on the front page? A solution was posted for the Attitude theme (https://www.themehorse.com/support-forum/topic/removing-link-in-slider/) but I couldn’t follow it or find how to locate theme folder -> library -> structure -> header -extension.php

    #22632

    Hi julie.pett,

    You need code customisation for it. You just simply go to the theme folder(interface)-> inc -> structure -> header -extension.php

    Can you see this code

    if( has_post_thumbnail() ) {
    	
    							$interface_featured_post_slider .= '<figure><a href="' . get_permalink() . '" title="'.the_title('','',false).'">';
    	
    							$interface_featured_post_slider .= get_the_post_thumbnail( $post->ID, $slider_size, array( 'title' => esc_attr( $title_attribute ), 'alt' => esc_attr( $title_attribute ), 'class'	=> 'pngfix' ) ).'</a></figure>';
    						}
    						if( $title_attribute != '' || $excerpt !='' ) {
    						$interface_featured_post_slider .= '
    							<article class="featured-text">';
    							if( $title_attribute !='' ) {
    									$interface_featured_post_slider .= '<div class="featured-title"><a href="' . get_permalink() . '" title="'.the_title('','',false).'">'. get_the_title() . '</a></div><!-- .featured-title -->';
    							}
    							if( $excerpt !='' ) {								
    								$interface_featured_post_slider .= '<div class="featured-content">'.$excerpt.'</div><!-- .featured-content -->';
    							}
    						$interface_featured_post_slider .= '
    							</article><!-- .featured-text -->';
    						}

    remove this code and add this code

    if( has_post_thumbnail() ) {
    	
    							$interface_featured_post_slider .= '<figure><a href="#" title="'.the_title('','',false).'">';
    	
    							$attitude_featured_post_slider .= get_the_post_thumbnail( $post->ID, $slider_size, array( 'title' => esc_attr( $title_attribute ), 'alt' => esc_attr( $title_attribute ), 'class'	=> 'pngfix' ) ).'</a></figure>';
    						}
    						if( $title_attribute != '' || $excerpt !='' ) {
    						$interface_featured_post_slider .= '
    							<article class="featured-text">';
    							if( $title_attribute !='' ) {
    									$interface_featured_post_slider .= '<div class="featured-title"><a href="#" title="'.the_title('','',false).'">'. get_the_title() . '</a></div><!-- .featured-title -->';
    							}
    							if( $excerpt !='' ) {								
    								$interface_featured_post_slider .= '<div class="featured-content">'.$excerpt.'</div><!-- .featured-content -->';
    							}
    						$interface_featured_post_slider .= '
    							</article><!-- .featured-text -->';
    						}

    From here you slider and all content is displayed but We recommended not to change the code because if you change the code then while updating to our new version all your customisation code will be lost. So better make child theme and first unhook the functions and the edit the code.

    http://codex.wordpress.org/Child_Themes

    Thank you!

    #42008
    Cucerescu
    Participant

    Hi,
    I want to remove the links from slider image but i cannot find that code from the above.
    Also the filename is header-extensions.php instead of header-extension.php
    Is this possible? interface pro 3.0.2

    #42080

    Hi Cucerescu,
    Yes the file name is header-extension.php, You need to find that above code and remove the <a> tag from that image. There are two slider in interface pro. Featured post/ page image slider and Upload Image slider. First make confirm that which slider are you using. Go through line no 521 there you can find the slider image code and also line no 589 to 593

    From there you may remove the <a> tag

    Note: Before making changes in the code first create a child theme then only customize the code. So that while updating to new version your customized code will not be lost. Other wise if you update to new version each and every time you need to make same code customization.

    Thank you!

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