Tag Info

New answers tagged

-1

Solution was to remove the style tag and and write the background styling right into the .featured_box div. Thank you to @ckhicks on Twitter for the solution, and thank you everyone else for trying to help out too <3 <?php $background = wp_get_attachment_image_src( get_post_thumbnail_id( $page->ID ), 'full' ); ?> <a href="<?php ...


0

The Problem It's been awhile since I have messed with HTML, but if I remember correctly the <style> tags would be global. To elaborate: <style></style> would be as if you appended it to the end of your css file, but if you did something inline, such as <h2 style="color: red;">test</h2>, it would only be applied to that html ...


1

Depending on how your Galleria plugin is interacting with the attachment image filters, you should be able to inject your data attribute using the wp_get_attachment_image_attributes filter. Obviously, the attribute would be added for anything using wp_get_attachment_image(), but it will do what you're asking. /** * Filter attributes for the current ...


0

The problem when you update / delete an image from a post or a page, WordPress doesn't change the value of the post_parent column of the attachment. So there is not a 'WordPress' way to exclude the images that are not actually inside the post. At least I haven't found one yet. The query will return all the images that was attached to this post no matter if ...


0

Read the documentation for get_post_gallery and you'll see that the function is intended to return thumbnail image sources. The function also returns a string IDs of images. So you can split it into array, and run wp_get_attachment_link within the same loop (with a defined index to reference correct image file ID) to query for full image source.


0

Whenever I'm trying to link two sites, I find the most efficient and least destructive way is to use the WordPress XMLRPC API. http://codex.wordpress.org/XML-RPC_WordPress_API/Posts In this case, you could pull this info through using the built in IXR_Client library. This saves a ton of time writing code and trying to mix databases. If they wind up on ...



Top 50 recent answers are included