Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter pashlikson

    (@pashlikson)

    I think I figured it out.
    For anyone running into the same problem: until around 2021, most WordPress themes ran on php template files (header.php, single-page.php, footer.php, etc.). Later, themes were implemented entirely on Gutenberg blocks, the so-called FSE – Full Site Editing. Therefore, such themes work on ordinary HTML templates, in which the main WordPress functions are not connected, such as wp_head and wp_footer, which are required for the shortcodes. For example, the standard theme Twenty Twenty-One still works on old php templates, while the more recent Twenty Twenty-Two and Twenty Twenty-Three are based on the FSE principle. So is the Raft theme I used on my project. I still don’t know how to make shortcodes work on FSE themes, but I was able to rebuild the entire website on the Twenty Twenty-One theme using Elementor. So, after spending a few days, I got working shortcodes and a website that looks the same as before.
    I think this topic can be closed.

    UPD: Probably i misspell Twenty Twenty-Two theme when was creating topic. Because, as I said, shortcodes ARE working on Twenty Twenty-One theme, but later on – don’t.

    Thread Starter pashlikson

    (@pashlikson)

    Just checked – everything looks fine, it only suggesting to update plugins and telling that background updates not working as expected.
    For me it seems like there’s problem with droplet setup and thus WordPress is limited in functional. I’m trying different hosting to check if problem still persists

    Thread Starter pashlikson

    (@pashlikson)

    Yes, I know. But it isn’t working.
    Maybe shortcode feature needs some special permissions on server or php modules?
    We’re using DigitalOcean droplet for website hosting.

    Thread Starter pashlikson

    (@pashlikson)

    Just tried deactivating everything and issue still persists.
    Also I saw people talking about relative issue suggesting to use content display:
    echo apply_filters(‘the_content’,$post->post_content);
    instead of standart:
    echo $post->post_content;
    But I am not really familiar with php so I am not sure if this can help me

    • This reply was modified 2 years, 11 months ago by pashlikson.
    Thread Starter pashlikson

    (@pashlikson)

    function test_shortcodes()
    {
    return ‘Shortcodes are working!’;
    }
    add_shortcode(‘test_shortcodes’, ‘test_shortcodes’);

Viewing 5 replies - 1 through 5 (of 5 total)