• Resolved shackbill

    (@shackbill)


    Ive tried adding this code to a child header.php file and i get nothing at all. not even an error.

    ive tried both of these methods:

    <?php if(function_exists('ditty_news_ticker')){ditty_news_ticker(317);} ?>
    
    <?php echo do_shortcode('[ditty_news_ticker id="317"]'); ?>
    

    Ive put some other shortcodes in that same space to test and they are working. I have ALL plugins turned off except this. Ideas?

    • This topic was modified 8 years, 3 months ago by shackbill.

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 22 total)
  • Thread Starter shackbill

    (@shackbill)

    nvm. i tried it with twentyseventeen and it works fine. there must be a conflict with my theme i will contact theme devs thanks.

    Plugin Author metaphorcreations

    (@metaphorcreations)

    Part of the issue may be where it’s placed in your header. It looks like you’ve placed it in the #et-top-navigation div, which doesn’t have any width on desktop and is very small on mobile.

    Try adding the ticker into one of your pages via shortcode to see if it works. The next step (if that works) would be to make sure you are adding the ticker where you actually want to add it in your header file.

    Thread Starter shackbill

    (@shackbill)

    i did actually try to put a shortcode on the standard page and it still didnt work so i switched themes to twentyseventeen and it worked which leads me to think the theme (Divi) is causing the problem.

    Ive also experimented by putting some other basic shortcodes in the header area and they worked. I also tried specifying using only 300px width for the tick but i got nothing at all. I at least would expect to see some overlap or misalignment – then at least i could have somewhere to start adjusting.

    Plugin Author metaphorcreations

    (@metaphorcreations)

    Can you add it (again) to a test page with a shortcode and let me know the link to that page?

    Thanks!

    Thread Starter shackbill

    (@shackbill)

    Sure.. Here is a test page on a dev site: the ticker should be in the middle of the page just below the event calendar and above the logo carousel.

    https://www.staging6.xtremebarbingo.com/

    thanks.

    Plugin Author metaphorcreations

    (@metaphorcreations)

    Thanks! For some reason the javascript for the ticker never gets going…

    Try installing this plugin https://ww.wp.xz.cn/plugins/query-monitor/ and also setting WP_DEBUG to true in your wp-config.php file and see if any javascript errors show up. I’m not seeing any in my browsers developer tools, but there must be something somewhere that’s killing the script.

    Thread Starter shackbill

    (@shackbill)

    so..i trashed the old tick and created a new one and put it in the middle of the page using shortcode and it works. Then, if i also add it to the header file (php function or do_shortcode), neither works.

    Ive added query monitor and WP DEBG but i dont see anything out of the ordinary.

    thoughts?

    Plugin Author metaphorcreations

    (@metaphorcreations)

    Were you using the same ticker when you had it in both the header and middle of the page? If so, you need to add a unique_id to one of them (or both) or else they won’t run correctly. Examples:

    [ditty_news_ticker id="15" unique_id="myuniqueid1"]

    $atts = array(
      'unique_id' => myuniqueid2
    );
    ditty_news_ticker( 15, 'my-custom-class, your-custom-class', $atts );

    So, attempt this and see if the main content ticker works again (while both are added).

    I still think the placement of the ticker in your header may be affecting the ticker as it’s crunched into a little space. Try moving the placement of the ticker to just be inside the main div of the header.

    Thread Starter shackbill

    (@shackbill)

    Ive contacted the theme dev and they say my location should work. Can you have a look at line 273 and perhaps you can see if it looks good to you.

    https://gist.github.com/puyaalexxx/4633426799dfcd14e4c6f1facaa6c442

    not sure what else i can do to get this to work in the header. thanks for sticking with me on this.

    Plugin Author metaphorcreations

    (@metaphorcreations)

    I have made a reply on your gist with a suggestion.

    Thread Starter shackbill

    (@shackbill)

    that gist was attached to the theme dev so i started a different one.

    https://gist.github.com/shackbill/bb1e545fe21aa9fb04330c1848ea091c

    I made the change but still no luck.

    • This reply was modified 8 years, 3 months ago by shackbill.
    Plugin Author metaphorcreations

    (@metaphorcreations)

    Can you pick the ticker back in the header (where I suggested) so I can check it out? It looks like you have removed it, but I’ll need to see it “in action” to try and come up with some suggestions.

    If you want to limit the display to a particular page for testing, wrap the shortcode in an if statement:

    if( is_page('my-test-page') ) {
      echo do_shortcode('[ditty_news_ticker id="317"]');
    }
    Thread Starter shackbill

    (@shackbill)

    Perhaps i can submit this through your website (i just registered there) so i can send you FTP creds because i thought i DID put it where you told me but apparently im doing something wrong?

    bill

    Plugin Author metaphorcreations

    (@metaphorcreations)

    I would just double-check the code again in your theme. And then also put a little text, like “test”, before or after the ticker code and see if that shows up.

    But, I don’t see any HTML for the ticker when I looked at your HTML source now. Even if the ticker isn’t working, the HTML for the ticker should still be on your site.

    Thread Starter shackbill

    (@shackbill)

    This is where i put it. here is a screenshot of my header.php This is just too dificult i guess i will look for another solution thanks.

    Screenshot of code Insert

Viewing 15 replies - 1 through 15 (of 22 total)

The topic ‘I get nothing..’ is closed to new replies.