WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have created a child theme, and I am trying to add a shortcode to its functions.php file, by doing this:

// functions.php of child theme


include(WP_CONTENT_DIR . '/graduates_functions.php');


// graduates_functions.php


// [bartag foo="foo-value"]
function sayhi_func( $atts ) {

    extract( shortcode_atts( array(
        'graduate_type' => 'seo',
        'bar' => 'something else',
    ), $atts ) );
    echo 'test';

add_shortcode( 'sayhi', 'sayhi_func' );


But when doing [sayhi] from a page I don't see the echo, I see [sayhi]. It works if I add the same in the functions.php of the theme itself, not the child.

Any thoughts?

share|improve this question
Its worth a second look, but it sounds like you do not have the child theme enabled. – Douglas.Sesar Apr 8 '14 at 22:24
where the graduates_functions.php is saved? – gmazzap Apr 9 '14 at 1:14
... and what is in graduates_functions.php? Is that part of your theme or the parent? – s_ha_dum Apr 9 '14 at 1:41

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.