I'm trying to make a breadcrumbs area that contains the homepage name first. The problem is the name is in another language. How can I get the custom name that is set in the pages area of the admin.

Edit: Thank you Zameer.
Also I found these 2 lines:

$page_object = get_queried_object();
$page_id     = get_queried_object_id();

that help you find the page ID and a few other informations about the page you are in.

有帮助吗?

解决方案

If you want title of a particular page using id then use

<?php echo get_the_title($ID); ?>

This function will return the title (as set in the pages area) of a post for a given post ID.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top