Pergunta

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.

Foi útil?

Solução

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top