Archived

This topic is now archived and is closed to further replies.

  • 0

Add Title to Carousel


Question

Posted · Report post

I have read the thread at http://www.pagelines.com/forum/topic/11137-how-to-add-title-to-carousel/ as well as the "add Hooks docs but am having an issue adding a title to the Carousel. I have adding the code provided in the referenced thread to my functions.php and init.php foles no avail. The code looks like this:

[CODE]
add_action('pagelines_inside_top_carousel','add_carousel_title');
function add_carousel_title() {?>
[/CODE]

When I try to use it, I receive a syntax error. Any ideas?

TIA
~Rat

Share this post


Link to post
Share on other sites

34 answers to this question

Posted · Report post

[quote name='batman' timestamp='1347919361' post='127182']
Hi
You can try with

[code]
add_action('pagelines_inside_top_carousel','add_carousel_title');
function add_carousel_title() {?>
YOUR TITLE HERE
<?php
}
[/code]

Please see first this link
[color=#215e9b][url="http://www.pagelines.com/wiki/How_to_Use_the_PageLines_Customize_Plugin"]How_to_Use_the_PageLines_Customize_Plugin[/url][/color]
[/quote]

Worked perfectly and thanks for the plugin tip! Perhaps you could help me one more thing...how would I go about adding the Current Category (i.e. [color=#000000][font=Consolas, Monaco, 'Courier New', Courier, monospace][size=3][background=rgb(243, 243, 247)]<p><?php single_cat_title('Currently browsing '); ?>.</p>)[/background][/size][/font][/color] into the "YOUR TITLE HERE" verbiage?

Share this post


Link to post
Share on other sites

Posted · Report post

I have to check with our developers but it seems to me that the hook isn't structured to work properly. I will ask one of my developers to take a look in the morning and apologize for the delay.

Share this post


Link to post
Share on other sites

Posted · Report post

Thanks Rob and no worries. Any help is greatly appreciated!

~Rat

Share this post


Link to post
Share on other sites

Posted · Report post

You're very welcome.

Share this post


Link to post
Share on other sites

Posted · Report post

Hi rat
You can try with

[code]
add_action('pagelines_inside_top_carousel', 'add_my_cat');
function add_my_cat( ) {
printf( '<div class="add_my_cat">%S</div>',the_category() );
}
[/code]

and move with css rules


[code]
#carousel .content ul li {
float: none;
text-align: left;
position: relative;
}[/code]

[size=4]but i´m not sure[/size]

Share this post


Link to post
Share on other sites

Posted · Report post

Upppsss sorry, is best to wait as rob said ....
;)

Share this post


Link to post
Share on other sites

Posted · Report post

[quote name='batman' timestamp='1347923151' post='127190']
Upppsss sorry, is best to wait as rob said ....
;)
[/quote]

LOL...I have just discovered that :)

Share this post


Link to post
Share on other sites

Posted · Report post

Don't give up on me Rob :). I really do not want to go that route if possible. FYI - There has to be some sort of conflict in the framework. The Facebook button will not work in the Sharebar correctly either ( I started a separate thread, but doubt an answer will be found ).

Seems like every time I come up against something with this platform, I have to solve it on my own. If you've got an inkling about the hook, I'm willing to give it a go...and won't hold you accountable :).

Rat

Share this post


Link to post
Share on other sites

Posted · Report post

Doesn't seem to be a problem to me.

This:

[CODE]
add_action('pagelines_inside_top_carousel','add_carousel_title');
function add_carousel_title() {
single_cat_title('Currently browsing ');
}
[/CODE]

Produces this:
[img]http://i.imgur.com/KIE5T.png[/img]

If you wanted to wrap that text in a <div> or <p> tag or add some other code to it, you'd need to do things a little differently like so (although this isn't the only way to do it):

[CODE]

add_action('pagelines_inside_top_carousel','add_carousel_title');
function add_carousel_title() {

printf( '<p>Currently browsing: %s</p>', single_cat_title('', false) );

}
[/CODE]

Share this post


Link to post
Share on other sites