Removing gallery, replacing with static images (simple PHP code? few seconds…)
-
Hey,
I had a custom WordPress theme designed and they used a gallery plugin for my homepage. I want to get rid of the gallery plugin because I only want to use one static image on the homepage. No need for a gallery/slider plugin.
So here is my code right now…
<?php if ( is_front_page() ) include (ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php'); else { while ( have_posts() ) : the_post(); ?>
Now again, I just want to have a static image on the homepage. So I thought the code would be something like this:
<?php if ( is_front_page() ) include ('<img src="IMG URL HERE">'); else { while ( have_posts() ) : the_post(); ?>
That doesn’t work though. I’m sure there must be something wrong with that. And I’m sure there is a simple way to fix this, but I don’t know PHP really.
Can anyone help me out here? I’m sure it’s a simple coding error, so if someone here who knows PHP well can post the correct code I would really appreciate it.
Thanks!
- The topic ‘Removing gallery, replacing with static images (simple PHP code? few seconds…)’ is closed to new replies.