Tagged: 

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #877302

    I followed the functions code found here to create a [year] shortcode, but it’s not working in my socket. Any idea what’s causing this?
    The [nolink] shortcode seems to work just fine.

    #877353

    Hey ecdoesit,
    I tested on a clean install and found it works, Can you please include a admin login in the private content area so we can take a closer look.

    Best regards,
    Mike

    #878314

    Sure. Thank you for taking a look.

    #878660

    Hi,
    The function was not in your functions.php, so I added it:

    function year_shortcode() {
    	$year = date('Y');
    	return $year;
    }
    add_shortcode('year', 'year_shortcode');

    Now it is working, but on your next update you will lose this change.
    When editing functions.php you should use the child theme, Read about it & Get it here

    Best regards,
    Mike

    #878662

    Hi Mike,

    Thanks for the reply! I actually did use a child theme and had a functions.php in there with that same exact code. I see you added yours to the parent theme.

    I’m guessing for some reason my child theme’s functions.php is not being used…

    Much appreciated,

    Eric

    #878664

    Figured it out. I didn’t enable the child theme. I feel like a dope. :P

    #878666

    Hi,
    I see your child theme now, but it is not activated. All of your settings are in your parent theme, so you will need to export your theme settings from your parent theme to use in your child theme when you activate it.

    Best regards,
    Mike

    #878667

    Gotcha! Thank you for putting up with my “doh” moment.

    #878670

    Hi,
    Always glad to help :)
    We will close this now. Thank you for using Enfold.

    Best regards,
    Mike

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Shortcode not working in socket’ is closed to new replies.