WordPress.org

Ready to get started?Download WordPress

Forums

Customizr
[resolved] News ticker in tagline...Possible? (8 posts)

  1. deputy05
    Member
    Posted 3 months ago #

    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.

  2. deputy05
    Member
    Posted 3 months ago #

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

    Thanks.

  3. d4z_c0nf
    Member
    Posted 3 months ago #

    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.

  4. deputy05
    Member
    Posted 3 months ago #

    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.

  5. d4z_c0nf
    Member
    Posted 3 months ago #

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

  6. deputy05
    Member
    Posted 3 months ago #

    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!

  7. deputy05
    Member
    Posted 3 months ago #

    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.]

  8. deputy05
    Member
    Posted 3 months ago #

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

Reply

You must log in to post.

About this Theme

About this Topic

Tags