我写过并翻译过一个主题,除了入门内容外,一切都很好。似乎我无法翻译内容,它仍以英语显示,尽管我已包含其他语言的翻译,并且默认的WordPress语言设置为其他语言。这是我的入门级内容阵列:
\'posts\' => array(
//Add pages
\'home\' => array(
\'post_type\' => \'page\',
\'post_title\' => _x( \'Homepage\', \'slug\' ),
\'post_content\' => _x( \'Welcome to your site! This is your homepage, which is what most visitors will see when they come to your site for the first time. Use the customizer to choose between a static homepage or display the latest posts in a beautiful 2-column layout instead.\', \'slug\' ),
),
\'about\' => array(
\'post_type\' => \'page\',
\'post_title\' => _x( \'About\', \'slug\' ),
\'thumbnail\' => \'{{featured-image-about}}\',
\'post_content\' => _x( \'Welcome on board! This is your about page, which is what most visitors will check to find out more information about yourself. Write here about your hobbies, work and passion.\', \'slug\' ),
),
\'contacts\' => array(
\'post_type\' => \'page\',
\'post_title\' => _x( \'Contacts\', \'slug\' ),
\'post_content\' => _x( \'This is a good place to add some basic contact information, such as an address and a phone number. You can also add a contact form with contact form 7 or another plugin\', \'slug\' ),
),
),
备注:页面(主页、关于、联系人)似乎按字母顺序存储(关于、联系人、主页),并按字母顺序显示为菜单项。我还想知道是否有办法按照页面输入的方式对页面进行排序,例如主页、关于、联系人,而不是关于、联系人、主页。