Quantcast
Channel: WordPress.org Forums » All Posts
Viewing all articles
Browse latest Browse all 134392

singinglawlady on "Auto-update image in functions php file"

$
0
0

Is there a way to make an image autoupdate in a container by using code in the functions php file? This is probably a dumb question and I'm probably not asking it right.

Basically, I want a box above my posts on all pages like this. So far, I have gotten the box to show up, but I would have to manually update the functions file everytime I post something within that cateogory that box would be linked to.
I don't want this person's theme, I only want that one element.
Here is a link to what I'm looking for:
http://i1282.photobucket.com/albums/a537/singinglawlady/ScreenCaptureatWedJul31193928CDT2013.png

Here is my code:

genesis_register_sidebar( array(
        'id'            => 'a_widget',
        'name'          => __( 'Homepage Below Menu' ),
        'description'   => __( 'This is below the bottom menu of the homepage.' ),
) );

	add_action( 'genesis_before_content', 'widget_before_content' );
	function widget_before_content() {
 	   echo '<div id="a_widget">';
	dynamic_sidebar( 'a_widget' );
		echo '<a href="/category/reviews/"><div class="promo_sect"><div class="promo_sect_img" style="background-image: url(INSERT LINK TO IMAGE HERE);"></div>CAPTION</div></a>';
		echo '<a href="/category/cover-reaveals/"><div class="promo_sect"><div class="promo_sect_img" style="background-image: url(INSERT LINK TO IMAGE HERE);"></div>CAPTION</div></a>';
	    echo '<div class="promo_sect"></div>';
	    echo '<div class="promo_sect"></div>';
    	echo '<div class="promo_sect"></div>';
    	echo '</div>';

}

Viewing all articles
Browse latest Browse all 134392

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>