I have a shortcode that I would like to add in the header of my articles near the title as well as on each article blocks of my blog page.
Could you tell me where the blog template php files and single blog page are located and where can I add them for both ?
I looked for template-functions.php but the shortcode does not appear in the header, don’t know why. It’s this php line : <?php if( function_exists(‘dot_irecommendthis’) ) dot_irecommendthis(); ?> provided by the plugin I Recomend This.
Thanks for helping,
Regards,April 16, 2021 at 22:22 #30698
To add/change this feature to your website, the best practice is to create your own child theme and override the template. Did you created one?
For more about creating child themes, please read the following post:
If you have never done this before, we recommend you to require the services from a nearby web developer or from Envato Studio freelancers (https://studio.envato.com/explore/websites-programming). This web platform gives you access to developers who have already experience with theme customizations, and for very competitive prices.
Best regards,April 19, 2021 at 11:20 #30732
Thank you for your feedback.
To edit the single post header, copy the ‘single.php’ file located in the cera theme to your child theme. In the case you want to edit de blog header, you’ll have to edit the ‘archive.php’ file.
If you want to use a shortcode, we suggest you to use the ‘do_shortcode’ function.
hope this will help you get what you’re trying to achieve.
Cheers,April 20, 2021 at 14:55 #30860
You’re welcome Dyflo! 🙂
If you’re happy with our theme, feel free to review our theme on our Themeforest page:
It’s very appreciated and it helps us making our products more known to new potential customers, which allow us more time to improve the quality over time and develop new features. It’s a win-win !
And by doing this, you will be making a great contribution to our community! #SharingIsCaring 💪🏻
Thank you!April 21, 2021 at 13:50 #30887
The topic ‘Adding shortcode in theme’ is closed to new replies.