Support » Fixing WordPress » Cannot make shortcode to change theme appearance

  • Dear forum members,

    This is mmy first post as I cannot get around a basic problem.
    I have added Content Views plugin to my WordPress 4.8.2 running Twenty Fifteen theme.
    I have correctly (I believe) configurated a three-column view that correctly shows three columns in the preview and provide me with the theme shortcode <?php echo do_shortcode(“[pt_view id=111bfebtaz]”); ?>
    I have tried to activate the multi-column view by copying the short code in the files: ‘404.php’ (template) , ‘functions.php’, or ‘index.php’ and after updating the files and refreshing the website view can still not get the shortcode to work as I still get the same Standard website appearance.

    Do I copy the shortcode in the wrong file?
    If not why can I not get it ti work?

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter chartsandtrends


    Looks like I found a way around by defining a static page (with I named ‘Home’) with the page shortcode contained therein as the website main page.

    The issue is that now the short code appears on page 2 and it also appears but two times on page 3.

    This is a real problem.

    Can anyone help?

    Moderator bcworkz


    You place the shortcode script where ever you want the shortcode output to appear on the appropriate template file. If you have a static front page, the template may be either page.php or content-page.php. The script as you posted it needs to go amongst HTML code because it contains <?php ?> delimiters. If you want the code placed within existing PHP code, remove the delimiters because they cannot be nested.

    You can also place just the [pt_view id=111bfebtaz] part in the page’s regular content and the output will appear with the page’s other content. To avoid having the output appear more than once, do not place it within the Loop. content-page.php is then out. page.php will work, but not between while and endwhile;.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Cannot make shortcode to change theme appearance’ is closed to new replies.