Support

Search results for ""

Sorry, no results found. Perhaps you would like to search the documentation?
All Topics
admin werus

Show image instead of text using shortcode

Hi,

Im trying to add a column where we’ll show the type of prodcut, but instead of a text:

– simple
– variable

we would like to show an icon or an image.

We found shortcode as an option but it looks like shortcode is not working. We try something like this just for testing:

add_shortcode(‘test_shortcode’, ‘test_shortcode’);

function test_shortcode(){
echo (“hola”);
}

Then we select our shortcode in a new column but don’t see anything in that column.

Are we doing anything wrong?

Cheers!

1 month ago
Stefan
Developer

So I believe you’re using the Shortcode column from our plugin. This column does render the selected shortcode when the shortcode is present in the body content of the post. It does not as you probably thought, render a shortcode. Instead of looking for a shortcode solution, you might be interested in creating your own column with our toolkit and having a more sustainable solution.

https://docs.admincolumns.com/article/21-how-to-create-my-own-column

4 weeks, 1 day ago

You must be logged in to reply to this topic.