Support » Plugin: GDY Modular Content » Install Instruction gdymc

Viewing 1 replies (of 1 total)
  • Plugin Author GDY

    (@grandy)

    Hey @bananajoexp sorry for broken documentation link. Seems like the doc will not become a reality in the near future – so i try to be detailed in this answer.

    Installation
    This plugin is kind of a development framework. It tries to deliver a pretty tailored editing experience and not to bloat your backend with tons of stuff that you don’t need or that editors can use to break the website … for this some initial setup is needed that normally have to be done by an developer.

    1. Install and activate the plugin
    2. Add a module area by using the [gdymc_area] shortcode in the post content or better adding the gdymc_area() function in your theme. Module areas are restricted to posts and terms (posts, pages, attachments, categories, custom post types …). It is only possible to create one module area per object (post or term).
    3. Create the modules folder ./wp-content/modules/ or use the gdymc_modules_folder filter to set a different path (for example in you themes folder)
    4. Create some content modules (more on that later)
    5. You can now edit in the frontend of your page (as logged admin or editor role)

    Creating a module
    The core part of GDYMC is that you can build your content out of different modules (kinda similar to gutenberg blocks but much easier to create but more powerful if it is needed). A content module can be as simple as just a HTML snippet or contain scripts, styles and php code that not just alter the module but also the website itself (wp hooks).

    To create a module create a index.php inside a new folder inside your modules folder … for example ./wp-content/modules/my-module-name/index.php.

    Inside this index.php you can work pretty much like in any other theme file. In addition to that you can use editable contents (more on that later).

    It is also possible to add a functions.php inside you module folder that is loaded pretty much the same than the themes functions.php. In that functions.php you can enqueue scripts or styles or adjust the website using WordPress hooks.

    Editable contents
    As mentioned earlier GDYMC is kind of a development framework. On of the functions delivered are editable contents. Inside your theme (post or term) or module you can use the contentCreate( $contentKey, $contentType = 'text', $contentOption = null ) function to create different editable contents.

    Parameters
    $contentKey
    Is used to identify the content inside the current instance (theme or module).

    $contentType
    To create different contents: text, image, gallery, table

    $contentOption
    Adjust the created content based on the content type

    Examples

    <?php contentCreate( 'headline', 'text' ); ?>
    <?php contentCreate( 'thumb', 'image', '400x300' ); ?>
    <?php contentCreate( 'showcase', 'gallery', 'autoxauto' ); ?>
    <?php contentCreate( 'infos', 'table', '5x3' ); ?>

    Hope that gives you a starting point. Best regards GDY

    • This reply was modified 7 months, 1 week ago by GDY.
    • This reply was modified 7 months, 1 week ago by GDY.
Viewing 1 replies (of 1 total)
  • The topic ‘Install Instruction gdymc’ is closed to new replies.