• Resolved deputy05

    (@deputy05)


    I am extremely new to this (day 4), so please keep this in mind. I am working with a child theme and the site is not public yet.

    I would like to put a news ticker (ditty news ticker is my current plugin) in the area of the tagline. I have tried various alterations of snippets that look like they may work without success. Any assistance would be greatly appreciated.

    Thank you.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter deputy05

    (@deputy05)

    Another possibility: Change the tagline block/container to a widget block/container?

    Thanks.

    Merge the code of my first reply here:
    http://wordpress.org/support/topic/search-bar-in-the-navbar-with-sticky-navbar
    with this one of my fisrt reply here:
    http://wordpress.org/support/topic/adding-a-search-in-the-header
    (look that here I forgot a line, so also take a look at two comment below that)

    Hope this helps.

    Thread Starter deputy05

    (@deputy05)

    Thanks again d4z_c0nf…will give it a try. I’m new to all of this…my coding experience is limited to building my website over the last week…so, still a lot to learn.

    Take a look here then: http://www.themesandco.com/code-snippets/
    You’ll learn faster 😀

    Thread Starter deputy05

    (@deputy05)

    Just cannot thank you enough d4z_c0nf.

    I just couldn’t manage to merge your codes to get it to work the way I wanted using the plugin. I did manage to add a widget area in place of the tagline using your link and borrowing from this link:

    Using a text widget with the marquee tag and a tiny bit of CSS, it works okay…not as fluid or user friendly as the plugin, but good enough for now.

    The full php code if interested:

    /* CREATE NEW TAGLINE WIDGET AREA */
    
    if (function_exists('register_sidebar')) {
        register_sidebar(array(
        'name' => 'Tagline Widget Area',
        'id' => 'extra-tagline-widget-area',
        'description' => 'A widget area intended to replace the tagline with a news ticker - DO NOT use with a tagline or add a widget title.',
        'before_widget' => '<div id="%1$s" class="widget %2$s">',
        'after_widget' => '</div>',
        'before_title' => '<h2 class="widget-title">',
        'after_title' => '</h2>'
        ));
    }
    
    /* DISPLAY NEW TAGLINE WIDGET CONTENTS IN THE TAGLINE */
    
    add_filter ('tc_tagline_display', 'add_my_widget');
    function add_my_widget() {
        global $wp_current_filter;
        ?>
            <?php if ( !in_array( '__navbar' , $wp_current_filter ) )  :?>
                <div class="container outside">
                    <h2 class="site-description">
                        <?php bloginfo( 'description' );
                        if (function_exists('dynamic_sidebar')) {
                        dynamic_sidebar('Tagline Widget Area');
                        }
                        ?>
                    </h2>
    
                </div>
            <?php else : //when hooked on __navbar ?>
                <h2 class="span10 inside site-description">
                    <?php bloginfo( 'description' );
                    if (function_exists('dynamic_sidebar')) {
                    dynamic_sidebar('Tagline Widget Area');
                    }
                    ?>
                </h2>
    
            <?php endif; ?>
        <?php
    }

    Thanks again!

    Thread Starter deputy05

    (@deputy05)

    Missing link:
    http://www.themesandco.com/snippet/adding-a-link-in-the-wordpress-tagline/

    [Moderator Note: Please ensure that you are embedding links correctly in your posts.]

    Thread Starter deputy05

    (@deputy05)

    @moderator:
    I was using the link button…will pay more attention next time.
    Thanks.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘News ticker in tagline…Possible?’ is closed to new replies.