sherred
Forum Replies Created
-
Forum: Hacks
In reply to: Wondrous WordPress humans please help me with a gallery & wp_get_attachment_urlHi there,
The top part of this reply is mainly about arrays so hopefully if you ever find yourself in a similar situation in the future you can hopefully avoid soiling your office chair – teach a man to fish and all that.
If you want to just get the code skip to the bottom.You can think of an array as a collection of information (AKA values). You can get a specific value from an array by using a key.
$array = array( "foo" => "bar", "bar" => "foo", ); echo $array['foo']; //will echo barIn php the key is optional, when it is not used PHP will use the increment of the largest previously used integer key.
$array = array("foo", "bar", "hello", "world"); var_dump($array);Outputs:
array(4) { [0]=> string(3) "foo" [1]=> string(3) "bar" [2]=> string(5) "hello" [3]=> string(5) "world" }The documentation for wp_get_attachment_image_src in the codex tells us that it returns an array containing:
- [0] => url
- [1] => width
- [2] => height
So the solution to your problem should be:
<?php foreach( $images as $image ) : ?> $full_image = wp_get_attachment_image_src(,$image->ID,'full'); $medium_image = wp_get_attachment_image_src(,$image->ID,'medium'); <a class="zoom" rel="thumbnails" href="<?php echo $full_image[0]; ?>"><img src="<?php echo $medium_image[0]; ?>"></a> <?php endforeach; ?>Civic’s cookie control software only tries to include jquery from the google api if it does not find it already loaded by the theme.
Pages in a twenty twelve theme with no other plugins show the cookie control plugin.This makes me think that it is more likely to be a plugin or theme conflict.
Forum: Plugins
In reply to: [Cookie Control] [Plugin: Cookie Control] No Async Analytics code?I plan to fix this in the next version.
I was wanting to release it earlier but haven’t had the timeForum: Plugins
In reply to: [Cookie Control] [Plugin: Cookie Control] Removing civicuk.com backlink?The link is not to my site. I have nothing to do with civic uk.
I have just wrapped their code into a WordPress plugin.They’ve created a free tool for people, I think it’s fair they get some credit for it.
Forum: Plugins
In reply to: [Cookie Control] [Plugin: Cookie Control] Change the lookHi version 1.4 has just been released. This uses the new look
Forum: Plugins
In reply to: [Cookie Control] [Plugin: Cookie Control] Change the lookHi,
the current version of the plugin uses the previous version of Civic’s Cookie Control.
the new version was only released a couple of weeks ago and will be used in the next version of the plugin, which I should have ready in the next few days.