WordPress.org

Support

Support » Plugins and Hacks » Network Latest Posts » Display titles without h3.nlposts-ulist-title

Display titles without h3.nlposts-ulist-title

  • Hi there

    I want to display post titles without the h3 tag of class nlposts-ulist-title.

    Instead of

    <ul class="nlposts-wrapper nlposts-ulist nav nav-tabs nav-stacked">
       <li class="nlposts-ulist-litem nlposts-siteid-163">
          <h3 class="nlposts-ulist-title">
             <a href="{url to post}">Post title</a>
          </h3>
       </li>
    </ul>

    this should be the structure

    <ul class="nlposts-wrapper nlposts-ulist nav nav-tabs nav-stacked">
       <li class="nlposts-ulist-litem nlposts-siteid-163">
          <a href="{url to post}">Post title</a>
       </li>
    </ul>

    Is there an easy way to do this without modifying the plugin?

    Plan B is to write heaps of CSS to make it look different, but then the style.css becomes bloated.

    Thank you

    http://wordpress.org/extend/plugins/network-latest-posts/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Jose Luis SAYAGO

    @iluminatus

    Hello Kobus,

    There’s only one way to do so without modifying the code. You could use jQuery for that, you’ll need to create a JavaScript file save it to your theme’s folder then load it from your functions.php.

    Name your JavaScript file: unwrap-nlptitles.js

    Add this to the file:

    <script type="text/javascript">
         jQuery(".nlposts-ulist-title a").unwrap();‚Äč
    </script>

    Then to your functions.php:

    wp_enqueue_script('unwrapjs',get_stylesheet_directory_uri().'/unwrap-nlptitles.js';

    That’ll remove H3 tags, I’m working on a better way to handle HTML wrappers for future releases, but it’s still on development. jQuery is the cleanest solution so far.

    Regards.

    Hey Jose

    Just another request for this feature please. I am including a list of news items within a page under existing h3 tags. It would be nice (and more semantic) if you could provide a way to either disable the use of h3 tags or a way to use an alternative, div for example, should the user require it.

    Awesome plugin. Very useful for us.

    Cheers,
    James

    Plugin Author Jose Luis SAYAGO

    @iluminatus

    Hello James,

    Thank you for your comment, I’m working to add theming support to this plugin. Themes will give you the ability to display elements the way you need. I’ll let you know once the new version is available.

    Cheers.

    Hi Jose

    Sounds great. Looking forward to seeing the finished update.

    James

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Display titles without h3.nlposts-ulist-title’ is closed to new replies.
Skip to toolbar