You can use is_front_page() instead of is_page(), too.
As is had the SEO issue: Here is a small workaround (that works for me). I just added an if case, to check for the right page. Maybe it could help you too Dave. 🙂
1. get the id for your home page (in my example below 335)
2. copy the logo-h1.php in your child-theme folder (if you are using the Child Theme Feature): /Newspaper-child/parts/header/logo-h1.php
3. change the following code in logo-h1.php:
if (!empty($td_customLogoR)) { // if retina
if($td_use_h1_logo === true) {
if (is_page(335)) {
echo '<h1 class="td-logo">';
}
else {
echo '<div class="td-logo">';
}
};
?>
<a class="td-main-logo" href="<?php echo esc_url(home_url( '/' )); ?>">
<img class="td-retina-data" data-retina="<?php echo esc_attr($td_customLogoR) ?>" src="<?php echo $td_customLogo?>" alt="<?php echo $td_logo_alt ?>"<?php echo $td_logo_title ?>/>
<span class="td-visual-hidden"><?php bloginfo('name'); ?></span>
</a>
<?php
if($td_use_h1_logo === true) {
if (is_page(335)) {
echo '</h1>';
}
else {
echo '</div>';
}
};
} else { // not retina
if (!empty($td_customLogo)) {
if($td_use_h1_logo === true) {
if (is_page(335)) {
echo '<h1 class="td-logo">';
}
else {
echo '<div class="td-logo">';
}
};
?>
<a class="td-main-logo" href="<?php echo esc_url(home_url( '/' )); ?>">
<img src="<?php echo $td_customLogo?>" alt="<?php echo $td_logo_alt ?>"<?php echo $td_logo_title ?>/>
<span class="td-visual-hidden"><?php bloginfo('name'); ?></span>
</a>
<?php
if($td_use_h1_logo === true) {
if (is_page(335)) {
echo '</h1>';
}
else {
echo '</div>';
}
};
}
}
edit: I have some formatting errors here and don’t know how to do it better. You should format the code.
Hello,
I just found that my fix breakes the smart sidebar. I fixed it by checking the offset directly:
if (cur_item_ref.content_jquery_obj.offset() != undefined){
cur_item_ref.content_top = cur_item_ref.content_jquery_obj.offset().top;
}
if (cur_item_ref.sidebar_jquery_obj.offset() != undefined){
cur_item_ref.sidebar_top = cur_item_ref.sidebar_jquery_obj.offset().top;
}
(around line 6148 ff)
-
This reply was modified 9 years by
euw.
Hi,
we have an issues with our WooCommerce layout (background not full width on single product view), since the next-to-last update.
We found out that you added two new css classes in some div classes in other php files, but not in the single-product.php located in /themes/Newspaper/woocommerce/.
We had to customize this file (row 39 & 40) and add this css classes.
<div class="td-main-content-wrap td-main-page-wrap td-container-wrap">
<div class="td-container tdc-content-wrap">
It would be nice to see this files updates in the next Newspaper update.
Thanks in advance.
Great, thanks for your support!
I have one more question: There is a link “View all results” at the bottom of the search result, which has the “wrong” parameter/url for us, because we replaced the standard search.
I found the parameter located in /includes/wp_booster/td_ajax.php (row 237). If I perform the change on the original location, it works fine.
If I place the modificated file in my Child Theme ( /Newspaper-child/includes/wp-booster/td_ajax.php ), it doesn’t work. Is it possible to place the modifications in the Child theme for further updates?
Thanks in advance.
You should try this: https://codex.wordpress.org/Customizing_the_Login_Form
WP Rocket is nice, because it has WooCommerce support 🙂
Hi Chris,
it doesn’t matter which theme settings are active (letters vs words). I have set up the title and content length in the theme excerpt settings for the modules.
It seems that the theme excerpt length settings will be ignored, if the editor writes an own excerpt in the post (like this one -> https://wpist.files.wordpress.com/2011/11/edit-page-e280b9-wordpress-beta-e28094-wordpress.png ).
I tried some other wordpress workarounds to limit the max excerpt length, found in the internet, but they will be ignored too.
As we have restricted content for our users, we need this function to change the excerpt.
The excerpt length without the individual excerpt work fine.
Ok.. finally i found a solution that works.
If someone needs the code, just put this in your functions.php and modify the cases.
function exclude_tags($tags) {
foreach ($tags as $tag)
switch ($tag->name) {
case ‘topnews’:
case ‘other-tag’:
break;
default:
$newtags[] = $tag;
}
return $newtags;
}
add_filter( ‘get_the_tags’, ‘exclude_tags’);
Hi,
this feature would be very nice (for Newspaper7 also), because i’m looking for an opportunity to hide empty categories, as we have a complex category structure.
Thanks!
