Building a page from scratch


Apologies, most symbols were changed into html codes equivelant.


Hey Firas,

If you want to write your own HTML, you may replace the entire loop as follow:

<?php

// Remove unecessary markup.
beans_remove_markup( 'beans_fixed_wrap[_main]' );
beans_remove_markup( 'beans_main_grid' );
beans_remove_markup( 'beans_primary' );

// Remove main block padding.
beans_remove_attribute( 'beans_main', 'class', ' uk-block' );

// Force layout.
add_filter( 'beans_layout', 'example_force_layout' );

function example_force_layout() {

    return 'c';

}

// Replace loop content.
beans_modify_action_callback( 'beans_loop_template', 'example_page' );

function example_page() {

    ?>
    <!-- Your HTML -->
    <?php

}

// Load the document which is always needed at the bottom of page templates.
beans_load_document();

Note that I set the layout to c which means fullwidth to prevent the sidebar(s) from loading. You will also notice that I removed some markup (as an example) used for the grid which aren't necessary in your case since your page is full width. You may have styling applied to the markup removed so I will let you adapt it according to your needs. Finally, I removed the uk-block class from the main div to remove the padding, again it may not but needed in your case but it is more for the example purpose.

Happy coding,

Write a reply

Login or register to write a reply, it's free!