D
D
Daniel2018-03-07 12:00:28
WordPress
Daniel, 2018-03-07 12:00:28

How to display post thumbnail url in plugin?

There is a plugin for real estate sites - Estatik, in order to display a post thumbnail, it uses a trace. function and the result is an image in the img tag

<?php if ( ! empty( $es_property->gallery ) ) : ?>
                        <b><?php es_the_post_thumbnail( 'es-image-size-archive' ); ?></b>
                    <?php elseif ( $image = es_get_default_thumbnail( 'es-image-size-archive' ) ) : ?>

I also need to display the url of this thumbnail in order to hang it on the background of this post description via background-image: url (). I found a function for these purposes get_the_post_thumbnail_url ()
But this function does not return anything, I guess because it is called from the plugin and something needs to be added ...
I myself am just starting to comprehend WP, ​​so I can not solve the issue

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question