Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter non_descript

    (@non_descript)

    Thank you for the advice but it didn’t work. I also tried adding the image to #main and .wrapper. Which are the id and the style class for the div surrounding this area in all content types – posts, pages… I don’t know if I am explaining it clear. Just for debugging purposes I added a border around the div (#page-wrapper) and I can only see the top border of the element. I even tried adding the style to the html tag itself, again just to test it, and still no result. May be something is overwriting the style? Any ideas?

    … and thanks for the Firebug advice I installed it and already helped me with some other issues I’ve been having. I will continue trying to debug this issue.

    non_descript

    (@non_descript)

    Hi,
    Did you manage to customize the search form? I want to do a similar thing and I am stuck for the moment so any help will be greatly appreciated.

    Thread Starter non_descript

    (@non_descript)

    Thank You!!!
    That did it.
    I am posting the whole code for future reference – just in case.

    <?php
    /**
     * This file provides additional functions for sharko's theme.
     */
    
     /**
     * Returns a "Continue Reading" link in BG for excerpts
     */
    function sharko_continue_reading_link() {
    	return ' <a href="'. esc_url( get_permalink() ) . '">' . __( 'прочети <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) . '</a>';
    }
    
    /*
     * Removes the get_the_exerpt filter
     */
    function sharko_remove_excerpt_filter() {
       remove_filter( 'get_the_excerpt', 'twentyeleven_custom_excerpt_more' );
    }
    add_action( 'after_setup_theme', 'sharko_remove_excerpt_filter' );
    
    /**
     * Adds a pretty "Continue Reading" link to custom post excerpts.
     *
     */
    
    function sharko_custom_excerpt_more( $output ) {
    	if ( has_excerpt() && ! is_attachment() ) {
    		$output .= sharko_continue_reading_link();
    	}
    	return $output;
    }
    add_filter( 'get_the_excerpt', 'sharko_custom_excerpt_more' );
    ?>

    Thread Starter non_descript

    (@non_descript)

    The most recent post now has the two links. The others are ok.

    Thread Starter non_descript

    (@non_descript)

    Thank you!
    I tried that but bumped into another problem. Now I don’t get the error but I got two “Continue reading ” links :). The first is as I want it and the second is the default. As if the old filter stays and both filters are called – first the one from the child theme then the default… Any help, plese!
    Here is the code:

    remove_filter( 'get_the_excerpt', 'twentyeleven_custom_excerpt_more' );
    function sharko_custom_excerpt_more( $output ) {
    	if ( has_excerpt() && ! is_attachment() ) {
    		$output .= sharko_continue_reading_link();
    	}
    	return $output;
    }
    add_filter( 'get_the_excerpt', 'sharko_custom_excerpt_more' );

    Probably the remove_filter didn’t work because the original filter is created in the parent theme’s functions.php which is loaded after the child theme?

Viewing 5 replies - 1 through 5 (of 5 total)