Why does my shortcode get executed before other content?

后端 未结 2 1852
臣服心动
臣服心动 2020-12-11 23:08

I have the following text in a page. As you can see my shortcode is right at the bottom but somehow when the code runs, the output of my shortcode is inserted at the top of

2条回答
  •  庸人自扰
    2020-12-11 23:44

    You can use as alternative:

    ob_start();
    ...your code...
    return ob_get_clean();
    

    and use without return the html as string.

提交回复
热议问题