Remove Breadcrumbs from pages

Posted in: Newspaper
Post count: 55

Hi,

I have a solution inside the functions.php but I am not happy with the CSS reload.

Anyone has a more elegant way?

function custom_page() {
if (is_page()) {
echo ‘<style type=”text/css”>
.entry-crumbs {
display:none
}
</style>’;
}
echo ‘<style type=”text/css”>
.container-fluid {
margin-top: -15px
}
</style>’;
}
add_action(‘wp_head’, ‘custom_page’);

Thank you,

Post count: 6600

Hi,

The best solution is to remove the breadcrumb code from each page, this example is from page template: http://screencast.com/t/WtHkRwhOyN

Another way that you can do it’s to set the breadcrumbs not to be displayed through all site via CSS and then also using custom CSS and set them be displayed only on post pages.

Add this CSS in Theme Panel > Custom CSS:

.entry-crumbs {
display: none;
}

.td-grid-wrap {
padding-top: 34px !important;
}

.single .entry-crumbs {
display: inline;
}

.single .td-grid-wrap {
padding-top: 49px !important;
}

Hope this helps!
Thanks

Post count: 55

Lucian,

Agreed. I create a different page.php template and worked just fine.

I guess it is a better approach than custom CSS inside functions.php.

Thank you.

Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.