Support » Plugin: WordPress Posts Timeline » Shortcodes Broken in Timeline

  • Hi,
    I’m seeing shortcode tags (ie: [box]Text Content[/box]) in my timeline -s there a way to tweak the php to strip shortcode tags from timeline text? looks like you already have a function for this, not sure why the following (from your code) isn’t working for me. any ideas greatly appreciated!
    thanks,
    kim

    //is shortcode active on page? if so, add styles to header
    //function has_timeline_shortcode( $posts ) {

    // if ( empty($posts) )
    // return $posts;

    // $shortcode_found = false;

    // foreach ($posts as $post) {

    // if ( !( stripos($post->post_content, ‘[wp-timeline’) === false ) ) {
    // $shortcode_found = true;
    // break;
    // }
    // }

    // if ( $shortcode_found ) {
    // add_timeline_styles();
    // }
    // return $posts;
    // }

    //add_action(‘the_posts’, ‘has_timeline_shortcode’);

    http://wordpress.org/extend/plugins/wordpress-posts-timeline/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter ookimb

    (@ookimb)

    or would it be this function, below (the above deals with adding timeshortcode, not stripping existing code) -if so could i somehow add if a specific code thread is found, strip it?
    thanks,
    kim

    //function timeline_text($limit){
    //$str = get_the_content(”, true, ”);
    //$str = strip_tags($str);
    // if(stripos($str,” “)){
    // $ex_str = explode(” “,$str);
    // if(count($ex_str)>$limit){
    // for($i=0;$i<$limit;$i++){
    // $str_s.=$ex_str[$i].” “;
    // }
    // return $str_s;
    // }else{
    // return $str;
    // }
    // }else{
    // return $str;
    // }
    //}

    Plugin Author hobbsh

    (@hobbsh)

    Can you post a link to your site? Are you using shortcodes in the post editor? What does the post content look like in HTML view?

    -Wylie

    I have the same issue, and my shortcode works in plain HTML view.
    I have inserted the shortcode through post editor…

    http://taragaucher.com/directory/full-width/adventures/

    The shortcode is for FinalTilesGallery that is showing on timeline.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Shortcodes Broken in Timeline’ is closed to new replies.