0

I'm currently working on a theme for my page that utilizes wordpress's built-in gallery system to make a slideshow with php/jquery.

(Post->create new post->add media-> create gallery)

Since by default the gallery allows for only thumbnails, I'm making the theme take the data that is inserted and applying it to the slideshow. Here is an example:

http://dev.sharetv.com/news/2014/07/test-gallery/

The caption is what you see as the title, and in the gallery "description" TEXTAREA is where you see all the dummy text.

Now, My Question:

How would I go about changing the built-in description textarea (see image), (in the gallery back-end) to the built-in wordpress editor (tinyMCE)? Our writers here aren't the best with HTML, and want to make it as easy as possible for them.

enter image description here

Is it possible to do this without editing the wp-admin files? And even if not, can someone point me in the right direction to handling this ?

Thanks in advance!

1 Answer 1

0

Try Advanced Custom Fields and simply add a WYSIWYG editor.

Step 1 Step 1

Et Voila! And Voila!

Displaying the input on the front-end

<?php
  /* Put the attachment ID in place of 999 */
  // Display
  the_field('yea', 999);
  // In case you need to don't want to display it right away
  get_field('yea', 999);
?>
6
  • PERFECT! I actually had a different custom-fields plugin, but didn't have this option. Thanks!
    – tcornell05
    Commented Jul 15, 2014 at 18:31
  • ACF is amazing, it's been instrumental in the way thousands of developers have worked with WordPress over the last many years. Definitely worth keeping in your wheelhouse.
    – deflime
    Commented Jul 15, 2014 at 18:36
  • Thanks again, one other question: Regardless, I'm sure I can figure it out: Is it possible to make it open in a lightbox? Perhaps have a button for a full screen view, and open it in a light box (just for more room)
    – tcornell05
    Commented Jul 15, 2014 at 18:38
  • I don't believe so. I assume if you access the uploaded image from the actual Media library you would get a much easier view of the WYSIWYG editor but that might be too annoying to have edit the descriptions through the Media library area. One other options is to perhaps override the css from the dashboard. Add to your functions.php file: add_action('admin_head', 'my_custom_css'); function my_custom_css() { echo '<style> .media-frame .imgedit-wrap .imgedit-settings { width:500px !important; } </style>'; } I'm not sure if the !important declaration is necessary.
    – deflime
    Commented Jul 15, 2014 at 18:48
  • Not the best solution since you'll have to keep an eye on it as new versions of WordPress come out and you might need to put some custom mobile css there too (not that anyone actually updates WP by mobile). But should do the trick.
    – deflime
    Commented Jul 15, 2014 at 18:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.