• Is there a way to hyperlink my tagline?
    It’s a phone number and I would love people to be able to click on it when on their phone to a direct call.

    Here’s my website:
    Breastdiagnostic.com

    I am hoping to hyperlink the ” 844-3D-MAMMO” part

    Thanks!

Viewing 11 replies - 1 through 11 (of 11 total)
  • Look at this snippet

    I am trying to do exactly the same thing as lindseybdc.

    I looked at the snippet. Copied and pasted code into child theme. It didn’t work for me, so I pasted it into a php validator trying to see what was wrong.
    I got:
    PHP Syntax Check: Parse error: syntax error, unexpected ‘}’ in your code on line 21
    I must be missing something.
    Could you explain more please?

    Thread Starter lindseybdc

    (@lindseybdc)

    Thanks @rdellconsulting for your help.
    I put the following in custom css section and it did not work:

    add_filter( ‘tc_tagline_display’ , ‘my_link_in_tagline’);

    function my_link_in_tagline() {
    global $wp_current_filter;
    ?>
    <?php if ( !in_array( ‘__navbar’ , $wp_current_filter ) ) :?>
    <div class=”container outside”>
    <h2 class=”site-description”>
    <?php bloginfo( ‘description’ ); ?>
    My link
    </h2>

    </div>
    <?php else : //when hooked on __navbar ?>
    <h2 class=”span7 inside site-description”>
    <?php bloginfo( ‘description’ ); ?>
    My link
    </h2>

    <?php endif; ?>
    <?php
    }

    Any follow up help appreciated.

    @lindsey, you’ve put it in the wrong place. As the snippet says:

    Copy and paste the following code in the functions.php file of your child theme :

    @jhippie, I suspect you didn’t cut&paste line 22 of the snippet which would account for that error message.

    Thank you for your response. I’m sorry for not understanding the snippet. It is probably clear to more experienced bloggers.

    This is what I tested in the validator after it failed:

    add_filter( 'tc_tagline_display' , 'my_link_in_tagline');
    
    function my_link_in_tagline() {
    	global $wp_current_filter;
    	?>
    		<?php if ( !in_array( '__navbar' , $wp_current_filter ) )  :?>
    			<div class="container outside">
    		        <h2 class="site-description">
    		        	<?php bloginfo( 'description' ); ?>
    		        	<a href="[PUT YOUR URL HERE]" title="[A TITLE]">My link</a>
    		        </h2>
    
    		    </div>
    		<?php else : //when hooked on __navbar ?>
    			<h2 class="span7 inside site-description">
    	            <?php bloginfo( 'description' ); ?>
    	            <a href="[PUT YOUR URL HERE]" title="[A TITLE]">My link</a>
    	        </h2>
    
    		<?php endif; ?>
    	<?php
    }

    It is that last } you thought I missed, right?

    Sorry, I must be misunderstanding something. Would you please show me exactly where in this code would I put <a href="tel:123-123-1234">123-123-1234</a>
    My current tag line is just a phone number, no wording. It appears at top of page. I just want it to be hotlinked for phones. I just want a mobile phone to be able to one click dial. No need for any title or wording like call me.
    Thank you for your time and assistance. The customizr theme looks so good on mobile devices. This is the one item I’m struggling with for phones.

    Give this a try in your child theme functions.php:

    add_filter( 'tc_tagline_display' , 'my_link_in_tagline');
    
    function my_link_in_tagline() {
        global $wp_current_filter;
        ?>
            <?php if ( !in_array( '__navbar' , $wp_current_filter ) )  :?>
                <div class="container outside">
                    <h2 class="site-description">
                        <?php //bloginfo( 'description' ); ?>
    <a href="tel:123-123-1234">123-123-1234</a>
                    </h2>
    
                </div>
            <?php else : //when hooked on __navbar ?>
                <h2 class="span7 inside site-description">
                    <?php //bloginfo( 'description' ); ?>
    <a href="tel:123-123-1234">123-123-1234</a>
                </h2>
    
            <?php endif; ?>
        <?php
    }

    I’ve suppressed the Tagline by adding // before bloginfo.

    Success! Thank you again for your assistance with this… and for the ongoing updates, support and development on customizr.
    Great theme!
    Great support!

    Better still, just delete the lines with bloginfo on them, if you don’t need them. Hurts my purist sensibilities to see a comment in the middle of a <?php ..... ?> even though it works ??

    You can only have the luxury of being a purist when you know what you are doing :]
    For me – when I ask for so much help – I must say:
    It works, therefore it is…
    I’m the only one who will see it and I don’t know enough to be offended!

    Thank you again for the assistance and a smile

    ??

    :)))))))))))))))))))

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Tagline to be a link?’ is closed to new replies.