2

Use wp_get_attachment_image_src to get the image properties and URL: $logo = get_theme_mod( 'custom_logo' ); $image = wp_get_attachment_image_src( $logo , 'full' ); $image_url = $image[0]; $image_width = $image[1]; $image_height = $image[2]; Edit: Adding more information based on your comment. The URL it points to is simply made with home_url: esc_url( ...


1

You should have the desired code defined within your clearline_func function like this: function clearline_func() { //copy & paste the profile-card.php code here } add_shortcode('test', 'clearline_func'); If you need to keep the profile-card.php file and want to avoid duplicate code then you should use PHP include() to call the file as @KFish ...


1

Not sure what your test() function is meant to achieve, or if you've even defined it, but yes if you haven't defined it then it's undefined. In reference to your question: "What's the best method to include all content from profile-card.php and use that shortcode to show it?" The answer is actually in your question, i.e. the best method to include it is to ...


Only top voted, non community-wiki answers of a minimum length are eligible