Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Add the bootstrap grid to the wordpress editor through a button or dropdown…

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #176285
    kai
    Participant

    Howzit fella’s, I’m currently building a wordpress site and I’m in need of some advice.

    I recently read this article Advanced Layout Templates In WordPress’ Content Editor and I’ve managed to add the grid from bootstrap 3 into the editor part of wp through the functions.php file. Though this is really great for layout and design its a bit annoying as it is static and I have to hard code the grid layout for posts, pages and custom post types.

    What I would like to know is, is there a way for me to add a button to the editor or dropdown that lists the different grid sizes and once one is selected, inserts it into the editor automatically? P.S I know there are plugins for this that use shortcodes and such, but they are overkill and i just want the basic grid.

    This is my first time posting a question, so if my question is a lil unclear and you guys need to see some code or screenshots, please let me know.

    #176342
    shaneisme
    Participant

    Shortcodes are the only way I know it. There might actually be a theme that’s just a basic BS3 setup that includes those buttons that auto-fill in shortcodes, or they’ll have specific types of posts that include built-in grid structures.

    #176408
    kai
    Participant

    Hi shaneisme, thanks for your reply.

    I have in tern managed to find out how to add buttons and such to the tiny-mce editor of wordpress and have written a very basic plugin that allows you to select the desired grid size, be it col-md-12 or col-sm-6 or whatever size you require. Once selected it adds them to the editor and outputs them appropriately to the page once the page has been published.

    I wanted to do it this way just purely because I find shortcodes to be a lil trixy for some of our less savvy clients and this is a simple point and click solution.

    Thanks for your input though, much appreciated.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Back End’ is closed to new topics and replies.