NewsTicker on pages not in Home

Posted in: Newsmag
Post count: 39

Hi TagDiv
on my site http://www.vignaclarablog.it/ i would like to put the newsticker immediately after the menu on all pages except on the Home Page. (archive, posts, pages, tag, search, 404, pst attachment) using ID sequence or unique tag like “evidence”.
There is a way to do it without using code or in the child theme?
Thanks
Fabrizio

Post count: 6535

Hi

You have to edit the file corresponding with header style used and add this code: http://screencast.com/t/u0c4ifVa66Xo

    <?php
    if (!is_front_page()){
        echo do_shortcode('[vc_row][vc_column][td_block_trending_now][/vc_column][/vc_row]');
    }
     ?>

Thanks!

Post count: 39

Perfect. Thanks
Can you help me on how to do it in my child theme so main theme updates do not broke anything?
Fabrizio

Post count: 6535

Hi

The theme allow to edit it’s header styles from child theme. For more details in this regard please check this link: https://forum.tagdiv.com/the-child-theme-support-tutorial/

Thanks!

Post count: 39

Hi Andrei
I tried in the child theme as you sho me. The newsticker is showed. But get some error on impagination.
See here
http://www.screencast.com/t/MjOmoNew48Q

The new code of the page is this one
<!–
Header style 7
–>

<div class=”td-header-wrap td-header-container td-header-style-7″>
<div class=”td-header-row td-header-top-menu”>
<?php locate_template(‘parts/header/top-menu.php’, true); ?>
<?php locate_template(‘parts/header/top-widget.php’, true); ?>
</div>

<div class=”td-header-row td-header-header”>
<div class=”td-header-sp-ads-left”>
<?php echo do_shortcode(‘[td_block_ad_box spot_id="custom_ad_1"]‘); ?>
</div>
<div class=”td-header-sp-logo”>
<?php locate_template(‘parts/header/logo.php’, true);?>
</div>
<div class=”td-header-sp-ads-right”>
<?php echo do_shortcode(‘[td_block_ad_box spot_id="custom_ad_2"]‘); ?>
</div>
</div>

<div class=”td-header-menu-wrap”>
<div class=”td-header-row td-header-border td-header-main-menu”>
<?php locate_template(‘parts/header/header-menu.php’, true);?>
</div>
</div>
</div>
<?php
if (!is_front_page()){
echo do_shortcode(‘[vc_row][vc_column][td_block_trending_now][/vc_column][/vc_row]‘);
}
?>

Post count: 6535

Hi

You have to insert the shortcode inside one the main header container. Replace the above code with this one, it should work fine: http://pastebin.com/h6uPtf3G

Thanks!

Post count: 39

Sorry but do not works again. 🙁
Someone on previous ticket to reach the result to get to ads (left & right) to the logo make me modify the header-style-7.php file in child theme like this.

<!--
Header style 7
-->

<div class="td-header-wrap td-header-container td-header-style-7">
<div class="td-header-row td-header-top-menu">
<?php locate_template('parts/header/top-menu.php', true); ?>
<?php locate_template('parts/header/top-widget.php', true); ?>
</div>

<div class="td-header-row td-header-header">
<div class="td-header-sp-ads-left">
<?php echo do_shortcode('[td_block_ad_box spot_id="custom_ad_1"]'); ?>
</div>
<div class="td-header-sp-logo">
<?php locate_template('parts/header/logo.php', true);?>
</div>
<div class="td-header-sp-ads-right">
<?php echo do_shortcode('[td_block_ad_box spot_id="custom_ad_2"]'); ?>
</div>
</div>

<div class="td-header-menu-wrap">
<div class="td-header-row td-header-border td-header-main-menu">
<?php locate_template('parts/header/header-menu.php', true);?>
</div>
</div>
</div>

Tryng to put your code
<?php
if (!is_front_page()){
echo do_shortcode('[vc_row][vc_column][td_block_trending_now][/vc_column][/vc_row]');
}
?>

before or after some last tags do not works.

Thanks

Post count: 6535

Hi

The code works fine on my side even if I’ve added the code for two ads: http://screencast.com/t/KBU7trul1MBN I’ve used this code to get the previous result: http://pastebin.com/uU5mfpsM and this css: http://pastebin.com/FUGduV2h
Make sure you added the code properly, clear the cache memory then test again.

Thanks!

Post count: 39

I have done all what you told me.
1) New header-style-7.php in a child theme
2) CSS is the same you gave me

Functionality are perfect. thanks. but… not the style as you se in the image (link below)
The sticker news row goes some pixels on the left of the agination with a line beside.
You can better understand on the example on the rigt of the image i made appling style2.

See the image at:
http://www.screencast.com/users/FabrizioRome/folders/Default/media/092ff928-c6e4-4ad5-9947-efc06047d24a

Thanks

Post count: 6535

Hi

Please provide a link where I can inspect this as I need to take a closer look to this issue.
Thanks!

Post count: 39

Hi Andrei
The site is vignaclarablog.it but i have restored the prevoius header file because was not working.
I can give you in a private mail access to admin so you can inspect.
Let me now the email address
Fabrizio

Post count: 6535

Hi

You can address us at contact@tacdiv.com with your login details and also give us ftp access so we can have a closer look to files structure and we will get back to you in shortest time.
Thanks!

Post count: 39

Hi Andrei
just sended to contact@tacdiv.com
Thanks
Fabrizio

Post count: 135

What is the code I use to add “newsticker” to all pages of the website in the header after the navigation? Or, if I have custom ad code under the navigation, can I put it there?

Post count: 135

How do I get to the header file php area as shown here? Is it done thru the wordpress dashboard or thru my host? I can’t find the header file folders as shown here: http://www.screencast.com/t/u0c4ifVa66Xo

  • This reply was modified 9 years by sejpost.
Post count: 23312

Hello sejpost,

Please keep in mind that our theme has a lot of header styles and if you want to do this modification you should do it inside the core file corresponding to your header style used by you. For example, if you are using the Header Style 7, you should check the theme core files, Parts->Headers and then, there you will see all the header templates, like this -> http://screencast.com/t/4PHYvgRyki and here you should add the code provided above.

Thanks for the message!

Post count: 135

Thanks Catalin. If I update the “header style” will it still be there when I do a theme update? Or, will I lose any changes to the previous header style?

Post count: 7909

Hi,

All the code modifications will be removed when you update the theme and you need to re-add theme. You could use the child theme – https://forum.tagdiv.com/the-child-theme-support-tutorial/

Thanks!

Viewing 18 posts - 1 through 18 (of 18 total)
The forum ‘Newsmag’ is closed to new topics and replies.