News Ticker

This is a PRIVATE forum for verified users only, to view all replies/answers, you must be logged in!

Status: not resolved
  • This topic has 7 replies, 3 voices, and was last updated 4 y, 10 mo by  Max.
Viewing 7 reply threads
  • Author
    Posts
    • #12048

      smartsaver
      Member

      Hello Maxxi and Jacob,

      Thanks for this. I have used this theme for over a year and all has been great.

      I am wondering if the news ticker can be customised in a way that i can include a custom link onto it?

      Right now it is only showing categories which i have checked and this means that i can only direct readers to other pages on my website.

      I would, however, like to point them to an external link. Would that be possible? (That link is actually a click tracker from external website, so i need to be able to have a field to input.)

      How can i do it?

      Appreciate any help, thanks!

    • #12057

      Jacob
      Staff

      Hey there, You must be logged in to view this reply!

      Login | Register | Forgot Password?

    • #12107

      smartsaver
      Member

      Hi Jacob,

      Thank you. But how do i include a field so that i can enter custom link for the site header?

    • #12121

      Jacob
      Staff

      Hey there, You must be logged in to view this reply!

      Login | Register | Forgot Password?

    • #12140

      smartsaver
      Member

      Hi Jacob,

      Thanks. Do you mean this?

      <?php
      
      				global $post;
      				/*Backup global post*/
      				$backup_post = $post;
      
      				$post_id = !empty( $post->ID ) ? $post->ID : 0;
      
      				$news_ticker = yt_get_options('site_news_tickers_query_posts');
      				$news_ticker = (array) $news_ticker;
      				//print_r( $news_ticker ); die();
      
      				$news_ticker_query_args = array(
      					'cat' => !empty( $news_ticker['cat'] ) ? $news_ticker['cat'] : '',
      					'tag__in' => !empty($news_ticker['tag']) ? explode( ',', $news_ticker['tag'] ) : array(), 
      					'posts_per_page' => !empty( $news_ticker['posts_per_page'] ) ? $news_ticker['posts_per_page'] : 10,
      					'order' => !empty( $news_ticker['order'] ) ? $news_ticker['order'] : 'DESC', 
      					'orderby' => !empty( $news_ticker['orderby'] ) ? $news_ticker['orderby'] : 'date', 
      				);

      Do i change the

      $post_id = !empty( $post->ID ) ? $post->ID : 0;

      to

      $post_id = !empty( $post->www.yahoo.com ) ? $post->ID : 0;

      and copy the entire code in site-newsticker.php to the custom-functions.php of the child theme?

      Sorry i’m not too good in this…

    • #12158

      Max
      Staff

      Hey there, You must be logged in to view this reply!

      Login | Register | Forgot Password?

    • #12209

      smartsaver
      Member

      Hi Maxxi,

      Thanks for this. I edited the parent file directly from Cpanel and saved it but i don’t see any changes at all. I don’t see the link.

      Instead of showing http://www.yahoo.com, can i show:

      Visit Yahoo! for more info!

    • #12223

      Max
      Staff

      Hey there, You must be logged in to view this reply!

      Login | Register | Forgot Password?

Viewing 7 reply threads
  • You must be logged in to reply to this topic.

This is a PRIVATE forum for verified users only, to view all replies/answers, you must be logged in!

© Copyright 2020 by wpthms.com. All Rights Reserved.