Hello, I am trying to put a social hover on images on the frontpage where I use blog grid.
I tried to customise postslider.php
This is the current code I have:
$stufflink = get_post_meta($the_id, 'wpcf-stuff_link', true);
$output .= $thumbnail ? "<a href='".$stufflink."' data-rel='slide-".avia_post_slider::$slide."' class='slide-image' title='' target='_blank'>{$thumbnail}</a>" : "";
However, I would like to wrap the thumbnail with the shortcode:
echo do_shortcode( '[shortcode]' . $text_to_be_wrapped_in_shortcode . '[/shortcode]' );
Is it possible? I can’t figure out how to put the code in between the shortcode for it to work.
Thanks.
Hi alvinhy!
not sure what you are trying to do. Can you show us an example?
What if you implement your code into Code Block element and implement it via shortcodes into your frontpage? for this you would need to activate debug mode.
Cheers!
Andy
Hello Andy,
I have a customised postslider.php for the BLOG GRID function on my page.
I want to have the short code wrapped around each blog post thumbnail.
You will see that I have manually added some code after the excerpts with custom fields.
Now I just want to wrap the shortcode around the thumbnail on blog grid posts.
Thanks,
Alvin
Hi!
Try doing something like this:
echo do_shortcode( "[shortcode]$text_to_be_wrapped_in_shortcode[/shortcode]" );
Best regards,
Josue