Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I am new in making word press theme. I am trying to call a image from a images folder which is in the theme folder of word press but when I refresh the page then all the page is disappear and nothing is showing even not any php error.
i want to show my logo in the wordpress theme which is like in the image
I think it has to be get_template_directory_uri() instead of get_template_directory_url() (lowercase i instead of lowercase l).
You also can use bloginfo. See: http://codex.wordpress.org/Function_Reference/bloginfo
In your case:
<img src="<?php bloginfo('template_url'); ?>/images/logo.jpg" alt="<?php bloginfo('name'); ?>">
And of course make sure you're image is in the right location.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I've created simple page where you can add images to database. Here is my code, where i pull images to website:
enter image description here
in DevTools i can see that all images are pulled correctly:
enter image description here
But when i click next/previous
website is reloading, but picture is still the same, and URL is changed:
enter image description here
Do you have any idea why?
I even add JS script to add intervals to this carousel but it's still doesn't work.
Thank you
It seems the problem about javascript library. it is not loading. You need to add full code to test it.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I would need a little help if I could. I have a store type web site made in wordpress. From anywhere on the site you want to enter the product page you can do it only if you click on the title. I want to make it possible to enter the product page and if you click on the image.
Below I attach the images with the code.
https://airless-consulting.ro/wp-content/uploads/2020/12/imagine_produs.jpg
https://airless-consulting.ro/wp-content/uploads/2020/12/titlu_produs.jpg
Do you have any suggestions?
Why don't you add a link on the image? Try this:
<a href="<?php echo esc_url($link); ?>">
<img src="" alt="" />
</a>
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 4 years ago.
Improve this question
I am using the Laravel framework and trying to display an image in a view. Here is the code in the show template that displays the image.
<img src="storage/cover_images/{{$post->cover_image}}">
In this file, I define the storage directory for the image
But the image won't show in the browser, it just pointing to this path
http://localhost/lsapp/public/posts/storage/cover_images/noimage.jpg while my images are in the lsapp/storage/app/public/cover_images folder.
Based on your question..as you want to display image in view.
run Command: php artisan storage:link
after that now you can display your image in view using Storage:url
<img src="{{ Storage:url($post->cover_image) }}">
Make sure to post code next time instead of screenshot.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I am trying to create a WordPress theme and need to be able to change the images on each page outside the WP text editor. Can this be achived without plugins?
Many thanks for you help.
You can use FTP Manager and replace old images with the new ones.
do you mean you don't just want to use the featured image on a page? - you can create a different template for each page with its own image on. For example if your site has three pages, home, about and contact for example, in your themes folder, saving page.php as page-home.php, page-about.php and page-contact.php is one way to do it. - alternatively use different featured images on each page.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I'm using Following code.
<img src="http://localhost/component/my_task">
its not working.
Any idea, Why not??
how can i perform my task in joomla by image source code.
NOTE:: this link perform my task ( MYURL/My_Component/My_Task). is it possible or not??
It's not working because http://www.localhost/my_task does not return a valid image.
Are you sure that you should use www.localhost? Remove the www part if you want it to point your local web server.
use $_SERVER['HTTP_HOST'] replace www.localhost
<img src="http://<?php echo $_SERVER['HTTP_HOST']?>/my_task/test.png">
If you're using Joomla! you could use path this way
<img src="<?php echo $this->baseurl ?>/path/to/your/image/image.jpg">
For ex, if you have your image in the default folder, it should look like
<img src="<?php echo $this->baseurl ?>/images/stories/myimage.jpg">.
The way you're doing you're not linking to an image, but to a directory....