• Resolved winston whitely

    (@winstonian)


    Hello,
    I’ve been trying to find a way to programmatically use collapseomatic short code in a php file rather than in the text editor.

    I have an index page that shows thumbnail images with excerpts shown beneath the thumbs. I have moved my content to display in the excerpts area by replacing, in a php file “page-activity.php”, “php the_content” with “get_the_excerpt”.
    Now my content shows up in my excerpts display area.

    So now that that’s working, I want to have this content show and hide when the user clicks on a thumbnail.

    I’ve been able, collaps,the content via the text editor but this is much too time consuming and it doesn’t allow me to use the post thumbnail image($img) as a trigger.

    I am close but I can use some help or suggestions.

    Thanks,

    ww

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter winston whitely

    (@winstonian)

    This is the code I’m trying to augment but it’s not working:

    This code is in my “page-activity.php” file

    echo?’‘.TT_C::image_filter($img).’‘;}

    I want to toggle the WordPress excerpt content, which I have populated with my WordPress main content.

    Plugin Author twinpictures

    (@twinpictures)

    I’ve been trying to find a way to programmatically use collapseomatic short code in a php file rather than in the text editor.

    check out the do_shortcode function

    Thread Starter winston whitely

    (@winstonian)

    Thanks, I’m going to experiment with this function.

    Thread Starter winston whitely

    (@winstonian)

    This is the original code that i’m trying to alter.

    echo '<a href="'.esc_url( get_permalink() ).'">'.TT_C::image_filter($img).'</a>';}

    This is my attempt but it’s not working.

    echo do_shortcode( ‘[expand title=”be-img-block”‘.TT_C::image_filter($img) )'” tag=”div” alt=”thumbnail image”]Target Content[/expand].’;}

    “target content” would be my post excerpts.(toggled up and down)

    Plugin Author twinpictures

    (@twinpictures)

    That code was not correctly formatted.

    What is the exact output of:
    echo TT_C::image_filter($img);

    What is the exact output of:
    echo do_shortcode('[expand title="'.TT_C::image_filter($img).'" tag="div" alt="thumbnail image"]Target Content[/expand]');

    Be sure you are using real double and single quotes (",') and not curly quotes (‘,”) as shown in your code above.

    Thread Starter winston whitely

    (@winstonian)

    See revised comment above..

    Thread Starter winston whitely

    (@winstonian)

    The output for the original code links to the post detail page.
    i’m hoping to have the post content toggle down underneath the post thumbnail image.
    here is an example of what i was able to do using the text editor https://recruitme.futbol, but i need for the trigger to be attached to the image(grid). You can login with: user:adaim and password:adam2

    I also tried this:

    echo [expand title="<'TT_C::image_filter($img)' />" tag="div" ] $php get_the_excerpt() [/expand];}

    but it’s not working.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Collapse-o-mattic on image post thumbnail’ is closed to new replies.