Skip to content

problem with page title and custom templates #124

@Jimmi08

Description

@Jimmi08

I copied templates to my theme and I couldn't get page title displayed.
There is this code:
<h1><?php echo get_the_title( KBE_PAGE_TITLE ); ?></h1>

But in KBE_PAGE_TITLE is slug, not title
define( 'KBE_PAGE_TITLE', kbe_get_knowledgebase_page_id() );

function kbe_get_knowledgebase_page_id() {
	return get_option( 'kbe_plugin_slug', false );
}

This was quick fix in kbe_knowledgebase.php:

$page = get_page_by_path(KBE_PAGE_TITLE);
<h1><?php echo get_the_title( $page->ID ); ?></h1>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions