Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter christianready

    (@christianready)

    I saw that same article. At this point I’m thinking that this is gonna entail a child theme where the option to select the template is added at the page level.

    Thread Starter christianready

    (@christianready)

    Thank you so much! Sorry it took me a while to get back to you but this works great now! The quiz is up at http://www.jerismithready.com/quiz/.

    Appreciate the prompt response!

    Thread Starter christianready

    (@christianready)

    Thank you so much for the feedback, and on a Sunday no less 🙂

    Since I’m trying to migrate from a previous quiz we already have the scoring algorithm set up for 5 levels (0-4) and would really need that. I’ll see if there’s another solution out there but if OpinionStage supports it that would be fantastic!

    Thread Starter christianready

    (@christianready)

    Thanks, but I managed to get it working. I had to re-add the AWS keys a second time and this time it worked just fine. Not sure what the hiccup was but I seem to be good to go now.

    Thanks!

    Thread Starter christianready

    (@christianready)

    Thanks. i was looking at that yesterday and I thought I was doing this correctly, but I cannot seem to get a value for the datetime attribute to render. I basically took your example and added an additional filter:

    add_filter('latest_tweets_render_date', function( $created_at ){
    	$datetime = DateTime::createFromFormat('D M d H:i:s O Y', $created_at );
    	return $datetimeX->format('Y-M-d H:i:s');
    }, 10 , 1 );
    
    add_filter('latest_tweets_render_date', function( $created_at ){
    	$date = DateTime::createFromFormat('D M d H:i:s O Y', $created_at );
        return $date->format('d M h:ia');
    }, 10 , 1 );
    
    add_filter('latest_tweets_render_text', function( $text ){
        return $text; // <- will use default
    }, 10 , 1 );
    
    add_filter('latest_tweets_render_tweet', function( $html, $date, $datetimeX, $link, array $tweet ){
        $pic = $tweet['user']['profile_image_url_https'];
        return '<article class="tweet"><figure class="tavatar"><img src="'.$pic.'"></figure><p class="my-tweet">'.$html.'</p><footer class="my-date"><time pubdate datetime="'.$datetimeX.'"><a href="'.$link.'">'.$date.'</a></footer></article>';
    }, 10, 4 );
    
    add_filter('latest_tweets_render_after', function(){
        return '<footer><a href="https://twitter.com/christianready/">More from me</a></footer>';
    }, 10, 0 );

    [Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

    To be on the safe side, I even called the value “datetimeX” in case “datetime” was a reserved word in PHP. The resulting <time> element looks like <time pubdate datetime=””> with no value for the datetime. Any guess as to what I might be doing wrong?

Viewing 5 replies - 1 through 5 (of 5 total)