[resolved] Shortocodes not working on custom theme (5 posts)

  1. isekzlysic
    Posted 1 year ago #

    Hello. First of all, sorry for my english, I am still a student. I'm currently working on website which was given to me to finish it. I didn't do the template. Thing is, that my shortcodes are not working, for example http://kstechnology.cz/stroje-a-zarizeni/briketovaci-lis/ (shortcodes are on the very bottom of the page), but when i switch to wordpress theme like twenty ten , the shortcodes are working perfectly. Does anyone have idea why or how to fix it? Please help someone, i am new to wordpress and i'm being stuck for 3 days and i need to finish it.

  2. alchymyth
    Forum Moderator
    Posted 1 year ago #

    do the shortcodes work if you add a test page just with the shortcodes?

    what is the code of page.php of the theme?

    is there any 'remove_filter()' code in functions.php of the theme?

  3. isekzlysic
    Posted 1 year ago #

    Thank you for your help, i really appreciate that.
    - Test page with just shortcodes doesn't work either
    - remove_filter() isnt't in any of php codes
    - there is no page.php, there is just front-page.php and index.php

    Here is the index.php code:

  4. alchymyth
    Forum Moderator
    Posted 1 year ago #

    replace line 12 of the pastebin code:

    <?php echo $wp_query->post->post_content; ?>

    with either:

    <?php echo apply_filters( 'the_content', $wp_query->post->post_content ); ?>

    or preferable:

    <?php the_content(); ?>
  5. isekzlysic
    Posted 1 year ago #

    Thanks a lot mate! It worked.

Topic Closed

This topic has been closed to new replies.

About this Topic