Tagged: socket
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.
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
Sure. Thank you for taking a look.
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
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
Figured it out. I didn’t enable the child theme. I feel like a dope. :P
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
Gotcha! Thank you for putting up with my “doh” moment.