1. Forum używa plików Cookies. Dowiedz się więcej o celu ich używania i możliwości zmiany ustawień Cookies w przeglądarce. Czytaj więcej...

W TRAKCIE Instalacja pluginu do WordPressa

Dyskusja w 'WordPress, Joomla!, PHP, HTML, CSS' rozpoczęta przez użytkownika jan1991to, 29 Grudzień 2017.

  1. jan1991to

    jan1991to Nowy użytkownik

    Wiadomości:
    1
    Docenione treści:
    0
    Dzień dobry.

    Zakupiłem plugin do wordpressa, który bardzo ułatwi mi prowadzenie mojej strony sportowej. Niestety nie potrafię zrobić jednej bardzo ważnej rzeczy aby ten plugin działał. Mianowicie aby główny plugin działał należy zainstalować drugi o nazwie "layouts builder". Posiadam instrukcje obsługi co należy zrobić, jednakże za bardzo jej nie rozumiem i w efekcie cała strona mi sie rozjechała, wyskoczyły krzaczki i musiałem robić przywrócenie bazy danych.

    Zamieszczę poradnik jaki otrzymałem i bardzo bym prosił o wyjaśnienie co należy zrobić. Za pomoc z góry uprzejmie dziękuję !

    Step 1: Components & Bodies registration
    Your will need create and register templates for components and bodies which will used for layouts building.
    For components fit templates like header, breadcrumbs, footer, copyright and other... Bodies is content layout template, like left-sidebar, boxed and other.
    Suppose so you create three components: header.php, footer.php and breadcrumbs.php, and bodies: left-sidebar.php, right-sidebar.php, boxed.php. And files located in theme directory: ./template-pars.

    Look how their registered in your theme function.php file:


    if (function_exists('lb__add_component')) {
    lb__add_component('header', 'Header', locate_template('template-parts/header.php'));
    lb__add_component('footer', 'Footer', locate_template('template-parts/footer.php'));
    lb__add_component('breadcrumbs', 'Breadcrumbs', locate_template('template-parts/breadcrumbs.php'));
    }

    if (function_exists('lb__add_body')) {
    lb__add_body('left-sidebar', 'Content with left sidebar', locate_template('template-parts/left-sidebar.php'));
    lb__add_body('right-sidebar', 'Content with right sidebar', locate_template('template-parts/right-sidebar.php'));
    lb__add_body('boxed', 'Boxed content', locate_template('template-parts/boxed.php'));
    }


    Step 2: Change theme index.php
    Now when all component and bodies which are needed to create all theme layouts registered. Next your need change or
    create one index.php file on your theme like this:

    <!DOCTYPE html>
    <html <?php language_attributes(); ?> class="no-js no-svg">
    <head>
    <meta charset="<?php bloginfo( 'charset' ); ?>">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="profile" href="http://gmpg.org/xfn/11">
    <?php wp_head(); ?>
    </head>

    <body <?php body_class(); ?>

    <?php echo lb__render_position("header"); ?>
    <?php echo lb__render_position("body"); ?>
    <?php echo lb__render_position("footer"); ?>

    <?php wp_footer(); ?>
    </body>
    </html>

    Step 3: Set support in theme
    All is ready. Now activate in your theme file function.php support Layouts Builder:
    add_theme_support( 'layouts-builder' );



    When your do this, the help section and generation of templates will be disabled.
     
  2. LorK

    LorK Przyjaciel forum Beta-tester

    Wiadomości:
    1 064
    Docenione treści:
    96
    to nie możesz go zainstalować?

    Opis, który przesłałeś, jest dość prosty - napisz czego nie rozumiem/nie potrafisz zrobić.
     

Poleć forum znajomym