WordPress.org

Ready to get started?Download WordPress

Plugin Directory

Maga Category Images

Maga Category Images v1.2.1 By Ricardo Magallanes. Associates an image file (jpg or png) to a given category.

Setup Instructions:

  1. Drag the 'maga-category-images' folder into your Plugins Folder.

  2. Find the plugin in the WordPress Admin and Activate it.

  3. After Activation you will find the 'Category Images' section under Settings.

  4. Fill out the form, choosing the images you want and the category you wish to associate them with.

  5. In your wordpress theme.. you can use two functions that are called invoking the $maga object.

    $maga->getSpecficImage($id) : Returns the url of the image corresponding to that category. This method can be used anywhere as long as you can fetch the ID you want.

    $maga->getImageInCategory : Returns the url of the image corresponding to the category you are currently browsing. This method is better suited for its use in your category.php files.

Example Usage:

<?php if($maga) : ?>
        <img src = "<?php echo $maga->getImageInCategory(); ?>"/>      
<?php endif; ?>   

<?php if($maga) : ?>
        <img src = "<?php echo $maga->getSpecificImage(3); ?>"/>       
<?php endif; ?>

Requires: 3.3.1 or higher
Compatible up to: 3.5.2
Last Updated: 2013-1-12
Downloads: 1,548

Ratings

3 stars
3 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

33,3,1
0,1,0
100,1,1