嗨,我正在使用这个钩子来获取页面的内容,并在启动时使用分页显示它。
get_the_content_by_id( $mobile_content );
问题是他不尊重我
<!--nextpage-->
尊重分页的合适钩子是什么?
我目前这样使用它,但我认为这不是正确的选择
$mobile_content = 2525; //id post or page
$pagina = (get_query_var('page')) ? get_query_var('page') : 1;
$shortcodebyid = get_the_content_by_id( $mobile_content );
$shortcodebyid = explode('<!--nextpage-->', $shortcodebyid);
echo $shortcodebyid[($pagina - 1)];
解决方案:echo get_the_content($pagina);