Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7778817
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T18:29:36+00:00 2026-06-01T18:29:36+00:00

I can’t seem to get my functions to work for changing the excerpt_more filter

  • 0

I can’t seem to get my functions to work for changing the excerpt_more filter of the Twenty Eleven parent theme.

I suspect it might actually be add_action( 'after_setup_theme', 'twentyeleven_setup' ); that’s the problem, but I’ve even tried remove_filter( 'excerpt_more', 'twentyeleven_auto_excerpt_more' ) to get rid Twenty Eleven’s function and still my functions aren’t changing anything…

Can you help?

Here’s the functions.php code in full:

http://pastie.org/3758708

Here’s the functions I’ve added to /mychildtheme/functions.php

function clientname_continue_reading_link() {
    return ' <a href="'. esc_url( get_permalink() ) . '">' . __( 'Read more... <span class="meta-nav">&rarr;</span>', 'clientname' ) . '</a>';
}
function clientname_auto_excerpt_more( $more ) {
    return ' &hellip;' . clientname_continue_reading_link();
}
add_filter( 'excerpt_more', 'clientname_auto_excerpt_more' );

Thanks,

Osu

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T18:29:38+00:00Added an answer on June 1, 2026 at 6:29 pm

    Ok, so after much frustration, I found a solution to this (I thought Child Themes were meant to speed things up!?). I believe this works because ‘after_theme_setup’ is run once the parent theme has been set up meaning you can remove / override Twenty Eleven’s functions at that point.

    If I’ve understood correctly, according to this documentation, the Child Theme is run first, then the parent and then the ‘after_theme_setup’ bit of code in your Child Theme’s functions.php file:

    http://codex.wordpress.org/Child_Themes#Using_functions.php

    and

    http://codex.wordpress.org/Plugin_API/Action_Reference/after_setup_theme

    This is what’s in my Child Theme’s functions.php file, hope this helps someone:

    // ------------------------------------------------------------------
    //                      // !AFTER_SETUP_THEME
    // ------------------------------------------------------------------
    
    /* Set up actions */
    add_action( 'after_setup_theme', 'osu_setup' );
    
    if ( ! function_exists( 'osu_setup' ) ):
    
    function osu_setup() {
    
        // OVERRIDE : SIDEBAR GENERATION FUNCTION - NO WIDGETS FOR THIS SITE
        remove_action( 'widgets_init', 'twentyeleven_widgets_init' ); /* Deregister sidebar in parent */
    
        // OVERRIDE : EXCERPT READ MORE LINK FUNCTION
        function osu_readon_link() {
            return '...<a href="'. get_permalink() . '" class="readmore">' . __( 'Read More...', 'clientname' ) . '</a>';
        }
        // Function to override
        function osu_clientname_custom_excerpt_more( $output ) {
            if ( has_excerpt() && ! is_attachment() ) {
                // $output = trim($output);
                $output .= osu_readon_link();
            }
            return $output;
        }
        remove_filter( 'get_the_excerpt', 'twentyeleven_custom_excerpt_more' );
        add_filter( 'get_the_excerpt', 'osu_clientname_custom_excerpt_more' );
        remove_filter( 'excerpt_more', 'twentyeleven_auto_excerpt_more' );
        add_filter( 'excerpt_more', 'osu_readon_link' );
    
        // OVERRIDE : EXCERPT LENGTH FUNCTION
        function osu_clientname_excerpt_length( $length ) {
            return 30;
        }
        remove_filter( 'excerpt_length', 'twentyeleven_excerpt_length' );
        add_filter( 'excerpt_length', 'osu_clientname_excerpt_length' );
    
    }
    endif; // osu_setup
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can't seem to get the Back Button to appear in a UINavigationController flow. I
Can somebody tell me how to get mod_rewrite to rename this: our-work-section.php?id=3&title=something to our-work-section/something/3
Can some one Guide me to work with these things... What is Model popup
can anyone tell me why this doesn't work? db = openOrCreateDatabase(database.db, SQLiteDatabase.CREATE_IF_NECESSARY, null); db.setLocale(Locale.getDefault());
Can't work out a way to make an array of buttons in android. This
Can we put functions to determine the condition for our list comprehensions. Here is
Can anyone help me trying to find out why this doesn't work. The brushes
Can i get the source code for a WAMP stack installer somewhere? Any help
can anyone help me in trying to check whether JavaScript is enabled in client
Can 2 or more equations defining a function in Haskell share the same where

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.