• Resolved jingle0

    (@jingle0)


    When I insert a page into another page some of the formatting is lost. I’m using Visual Composer to build my pages and in this case I have a colored background around an image and some colored text. The images and colored text come in fine but the colored background does not.

    suggestions, hints, tips, help?

    thx,

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Paul Ryan

    (@figureone)

    Sounds like Visual Composer is creating stylesheets for custom formatting. I’ll try to create a custom integration in the coming months to tell inserted pages to fetch those custom stylesheets. Dealing with a death in the family right now, so there won’t be any progress in the short term.

    Thread Starter jingle0

    (@jingle0)

    I’m so sorry to hear of your loss. Please accept my condolences. When you have time is just fine.

    thx

    This is really useful and easy to use plugin. One issue that I am facing is something strange to me.
    I am using it with the creator plugin so I have to switch to Classic Editor to insert page. Which is done quit comfortably. But when I switch back to the creator and make any small change using the creator everything is lost. When I switch back to editor again, I see my code(for insert page) is messed up..
    In the end I am unable to see the contents of the included page..
    Any immediate help will be much appreciated..

    Plugin Author Paul Ryan

    (@figureone)

    Hey @jingle0, coming back to this question regarding integration with Visual Composer. I’ve done a similar integration in the past with Beaver Builder, where their custom CSS gets enqueued for pages that are inserted via this plugin.
    https://github.com/uhm-coe/insert-pages/blob/master/insert-pages.php#L237

    Since Visual Composer isn’t an open source plugin, I’m unable to look at the codebase to figure out how to integrate with it. If you’d like to start a support thread with WPBakery, I’d be happy to see if there’s something I can do to enqueue the custom CSS that Visual Composer generates whenever those pages get inserted.

    Let me know!

    I had actually created a custom visual composer module for this plugin, so when using visual composer, I can drag my module onto the page, type in a slug or ID and the type of content, and it’ll automatically write in the shortcode.

    VC shortcode:

    $insert_page = new FCMModule( "insert_page" , "Insert Page" , 'Embed any WordPress content on your page' , array(
    	new TextField('Page','p','General','Page Slug or ID', true),
    	new TextField('Type','type','General','title|link|excerpt|excerpt-only|content|all|{custom-template.php}'),
    	new TextField('Additional Classes','classes')
    ));
    $mapper->map( $insert_page );

    View file:

        $content = "[insert page='".$p."' display='".(empty($type) ? 'content' : $type)."' class='inserted-page".(empty($classes) ? '' : ' '.$classes)."']";
        echo '<!-- Insert Page Shortcode: '.$content.' -->';
        echo do_shortcode($content);

    Aside from that, I’d recommend giving your rows classes and then using your stylesheet to apply background colors since the “design” tab on some elements in VC generate a page-specific stylesheet that does not get inserted with this plugin.

    • This reply was modified 7 years, 10 months ago by Tessa Watkins.
    • This reply was modified 7 years, 10 months ago by Tessa Watkins.
    Plugin Author Paul Ryan

    (@figureone)

    Thanks for the tips! I’ll link to your post in a few other threads that discuss Visual Composer issues.

    Again, if anyone can communicate with WPBakery about a way to enqueue the page-specific stylesheets for Visual Composer, I’ll gladly incorporate it. I’ve already done this for a similar plugin, Beaver Builder:
    https://github.com/uhm-coe/insert-pages/blob/master/insert-pages.php#L237
    https://www.ads-software.com/plugins/beaver-builder-lite-version/

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘visual composer and insert content’ is closed to new replies.