How to add shortcode to theme


I have a travel blog and want to add a clickable world map to the home page, linking to the corresponding page. The map has been made and all I have to do is place the shortcode in the right place.

The only problem is… I have my latest posts set as my home page, not a static page. Meaning there is no page I can simply edit.

I have tried adding the shortcode in the theme file editor but it would either not show up at all or be placed at the top of my page (but I want it to be at the bottom)

I used this code: echo do_shortcode(’[shortcode goes here]’);

Can anyone tell me how I can add the shortcode to my home page?

Mind you I have absolutely no experience with coding.

1 Comment
  1. You will need to modify php code, probable make a child theme. Is kind of a messy job because you will have to dissect the theme workflow.

    An alternative would be to set a page as the home page and add the latest post via another plugin.


This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer