Home Forums Plugin Support WP User Frontend (Free Version) How can I stop the plugin to wrap other elements with which are not related?

This topic is: not resolved

This topic contains 2 replies, has 2 voices, and was last updated by  sjeev 5 years, 1 month ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #14564

    sjeev
    Member
    Post count: 1

    The plugin wraps everything in the post-meta with it's <ul> and treat like it's own custom fields. If the post-meta has div and span elements, the plugin wraps them too.

    That makes the code invalid and the page looks ugly if it wraps all the divs which are not related to WPUF.

    For example, if I have related_posts plugin and add_this plugins installed and their content will also be wrapped by your plugin. And the code looks like this:

    <div class="post-content">
       <p> </p>
       <p> </p>
          <ul class="wpuf_customs">
               <li>
               <li>
                   <label>test</label>
                            : test
               </li>
    
               <ul> other plugin content	
               </ul>
               <ul> <div> <span>other plugin content</span>
                     <span>other plugin content</span>
                    </div>	
               </ul>
          </ul>

    I managed to separate the div elements from the plugin's class="wpuf_customs" using jquery. But that causes another trouble on posts loop.

    jQuery(document).ready(function () {
        var plugin = jQuery('.wpuf_customs');
        plugin.find('>ul').children().insertAfter(plugin)
    });

    So I had to remove the entire function wpuf_show_meta_front in the plugin file.

    Can you provide a solution to stop the plugin wrapping elements which are not related to it?

    Thanks!

    #14576

    Tareq Hasan
    Keymaster
    Post count: 2831

    That shouldn't be the case.

    It only wraps them in that <ul> only if they are added via the custom field option from the admin panel. The error might happen because some of the items have mismatched <div> tag and I haven't seen this weird thing anywhere. Only the mismatched tag might be the issue IMO.

    #14585

    sjeev
    Member
    Post count: 1

    Hello Tareq,

    It wraps every element which is not related to WPUF after the plugin's custom fields.

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘How can I stop the plugin to wrap other elements with which are not related?’ is closed to new replies.