• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Placing Ditty News after the Header

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Placing Ditty News after the Header

This topic is: not resolved

Tagged: genesis_after_header

  • This topic has 2 replies, 2 voices, and was last updated 8 years, 5 months ago by peterlaz.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • December 6, 2016 at 5:17 am #197110
    peterlaz
    Participant

    Theme : Enterprise pro
    URL : http://plan2040.com

    I am using the Ditty News Ticker plugin to show message below the header. When I place the code from the plugin (<?php if(function_exists('ditty_news_ticker')){ditty_news_ticker(115);} ?>) in genesis_after_header HOOK, ditty news works flawlessly.

    However, I would like to embed the php code into the functions.php file for easy management. I have placed the following code in the functions.php file

    add_action( 'genesis_after_header', 'ditty_news_ticker' );
    function your_awesome_code() {
    if(function_exists('ditty_news_ticker')){ditty_news_ticker(115);}
    }

    And in the style.css I am using

    .mtphr-dnt-tick-contents {
    height:30px !important;
    margin-left: 382px;
    margin-right: 382px;
    font-size: 18px !important;
    font-weight: 600;
    color: #fff;
    padding-bottom: 5px;
    background: red !important;
    }

    However, only the CSS customization appears in the ticker. The ticker message is not showing.

    I contacted the plugin developer and he suggested to use the following code in the functions.php

    function show_ditty_news_ticker() {
    if(function_exists(‘ditty_news_ticker’)){ditty_news_ticker(115);}
    }
    add_action( ‘genesis_after_header’, ‘show_ditty_news_ticker’ );

    However, nothing shows up. He then suggested to use the following code to see if the the “action” being hooked into does actually exist..

    function show_my_test_text() {
    echo 'THIS IS MY TEST TEXT THAT SHOULD SHOW RIGHT BELOW THE HEADER';
    }
    add_action( ‘genesis_after_header’, ‘show_my_test_text’ );

    I tried his suggestion. Again nothing shows up. He responded by saying

    The modification I suggested would be the correct code to use if they actually have a custom action in their framework called “genesis_after_header”. This would trigger the “show_ditty_news_ticker” function which contains the news ticker embed scripts."

    https://wordpress.org/support/topic/showing-the-ticker-after-header-in-genesis-theme/#post-8519277

    His final response is this "you may need to contact the Genesis team for help on this as I don’t use or know their framework".

    My question: Why is it that when I place the php code in the hook it works but not in the functions.php file.
    Please help.

    Thanks.

    http://plan2040.com
    December 6, 2016 at 10:25 am #197119
    Victor Font
    Moderator

    There doesn't seem to be anything wrong from the Genesis side. The ditty news ticker wrappers are being generated in the genesis_after_header area. You can see them in the source code after nav primary when viewed in the browser. Are you calling the right content?


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    December 12, 2016 at 9:51 pm #197500
    peterlaz
    Participant

    Thanks Victor for the analysis.

    Basically it is a silly mistake of mine. I updated your feedback to the plugin developers and they have resolved the problem.

    This is their response

    when you copy/paste the code from here the quote marks paste wrong (they paste as slanted single quotes), so I had to replace the single quotes in the pasted code manually and the code works as expected.

    I am glad it is resolved now.

    Thank you again for taking your time to response to my request for help.

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble