I tried to get random media id from wordpress media gallery using this:
I need add another image in the standard “Text and Full Image(text right) layout” in WordPress. This layout by default has a field for an image. I located the php file that renders this page which is text-and-full-image-text-right.php
Is there a way I can add a new image field in this standard layout? The Screenshot below shows you where I need to place my new image. I know how to use custom fields in a template, but not sure how to use them in the layouts/rows in the edit screen?
I’m uploading a different mp3 file to each post as an attachment and using wp_get_attachment_metadata() to print the duration of the mp3 file. Sometimes the…
I am able to create a new post by sending a request with cURL against the REST API. That works fine.
We use this code to display the link …
I have a WordPress installation that I want to reinstall. However, I also have in it several uploaded files (.doc and PDFs) that are linked by external sites. They are not used in any of my own pages: I just uploaded them to my WordPress site instead of putting them in a Dropbox or a Google Drive, and now I can’t (or shouldn’t) delete them.
I’d like to have my attachments IDs being random (not sequential). Just like what this plugin does, but for attachments. I’ve tried to look into the source code of the plugin, but it uses filters that are not applicable to attachments.
Following the approach in the developer docs for selected() but can’t get it to work with a custom field in the media library for a select list.
I have this code that shows all images attached to my post-type.
Is there a way to paginate those? I have like 25 pics and I wan’t to avoid scroll as much as I can.
I am using WordPress 3.4.1 on Ubuntu 12.04 using Apache and PHP 5.3.X