Viewing 1 replies (of 1 total)
  • Hi!

    There are multiple options, either use functions to remove <img src= etc. Or edit/add functions in plugins folder: plugins/category-thumbnails in public_api.php file.

    there is function get_the_category_thumbnail() and in the end return has:
    sprintf(‘<img src=”%s”%s />’, $data->url, implode(‘ ‘, implode_attributes($attributes)));

    you can add new function eg. get_the_category_thumbnail_url(), where all other data leave as is in initial function just change the last row:
    sprintf(‘%s’, $data->url);

    Sure that in case if you don’t need other data as alt, sizes etc. You can change also initial function, but keep in mind, that you have to update this file, when you update plugin. Or you can creat your own MU plugin

    Regards,
    Argo

Viewing 1 replies (of 1 total)
  • The topic ‘Only get image URL category.’ is closed to new replies.