• Hi,

    So, I made this simple shortcode that simply returns the modified date for a certain page. And for some reason, it does not display on the front page.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter seanking2919

    (@seanking2919)

    I should specify. The shortcode uses get_the_modified_date().

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    What shortcode and where does it appear on the other pages & where does it not appear on the homepage? How did you create the shortcode?

    Thread Starter seanking2919

    (@seanking2919)

    I’m putting it at the very top of the main content of the front page temporarily above the slider to test it for now. Anyways, here’s the code. The shortcode that specifically isn’t working is last_updated_sm_privacy.

    <?php

    function shortcode_post_published_date(){
    return get_the_date();
    }
    add_shortcode( ‘post_published’, ‘shortcode_post_published_date’ );

    function shortcode_post_last_modified_sm_privacy() {
    return get_the_modified_date(”, 938 );
    }
    add_shortcode (‘last_updated_sm_privacy’, ‘shortcode_post_last_modified_sm_privacy’ );

    ?>

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Shortcode I made is not working on the front page’ is closed to new replies.