Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Wordpress Nivo Slider Editor

Featured Replies

I have been following a tutorial on wp.tutsplus.com on creating a slider for wordpress. I have managed to create it ok, but I wanted to add an editor to it to allow more text.

 

Using the register_post_type tag I have added 'editor' to the list of options that it supports. The editor now appears in my Nivo slider option, but the text I write in the editor does not appear in the slider.

 

I know that I have to add some code to this loop:

 

function np_function($type='np_function') {
   $args = array('post_type' => 'np_images', 'posts_per_page' => 5);
   $result = '<div class="slider-wrapper theme-default">';
   $result .= '<div id="slider" class="nivoSlider">';
   //the loop
   $loop = new WP_Query($args);
   while ($loop->have_posts()) {
       $loop->the_post();

       $the_url = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), $type);

       $result .='<img title="'.get_the_title().'" src="' . $the_url[0] . '" data-thumb="' . $the_url[0] . '" alt=""/>';
   }
   $result .= '</div>';
   $result .='<div id = "htmlcaption" class = "nivo-html-caption">';
   $result .='<strong>This</strong> is an example of a <em>HTML</em> caption with <a href = "#">a link</a>.';
   $result .='</div>';
   $result .='</div>';
   return $result;
}

, but I don't know where to put it or what the code should be.

 

Can anyone help?

 

Thanks.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.