The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript [Solved] AnythingSlider & WordPress – the_title(); -> Slidernames Re: [Solved] AnythingSlider & WordPress – the_title(); -> Slidernames


@jamy_za, thank you, because of ur post I found a solution… :)

In case anybody else wants to use it, here it is.
This is my “formatText” jQuery function:

        function formatText(index, panel) {
var title = $(panel).find("h2").text();
return title;

(“panel” contains the full post by default (everything inside the LI))

and this is my “WordPress Loop”:


    // The Loop
    if (have_posts()) : while (have_posts()) : the_post();
    echo '

  • ';
    the_post_thumbnail( array(880,880) );
    echo '

    echo '

    echo '

  • ';
    endwhile; else:
    echo '

  • No Content. :-(

  • ';

works! :-) But only if you have only one H2 Element in the post… a second one could mess this up (not tested)

Oh, and this should be set in the anythingSlider “Options”:

    		        navigationFormatter: formatText // Details at the top of the file on this use (advanced use)