WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. isekzlysic
    Member
    Posted 8 months 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
    The Sweeper & Moderator
    Posted 8 months 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
    Member
    Posted 8 months 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:
    http://pastebin.com/kbXaf1Gh

  4. alchymyth
    The Sweeper & Moderator
    Posted 8 months 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
    Member
    Posted 8 months ago #

    Thanks a lot mate! It worked.

Reply

You must log in to post.

About this Topic