Skip to content

Instantly share code, notes, and snippets.

View MatRouault's full-sized avatar
🏠
Working from home

Mathieu MatRouault

🏠
Working from home
View GitHub Profile
@MatRouault
MatRouault / slider-gallery-with-beans.php
Created August 23, 2017 16:14
Image Gallery in Post With Slideshow Effect
@MatRouault
MatRouault / video-above-header.php
Last active December 17, 2016 14:01
Add a video or featured image above post header
<?php
/*https://community.getbeans.io/discussion/video-post/#post-3032 */
add_action( 'admin_init', 'my_function_name' );
function my_function_name() {
$fields = array(
array(
@MatRouault
MatRouault / WordPress_tips.md
Last active April 6, 2021 17:06
Some useful WordPress tips, tutorials and code snippets found here and there on the web.
@MatRouault
MatRouault / Editorial_Tools.md
Last active April 23, 2017 14:10
Usefull webtools for blogers and journalists.
@MatRouault
MatRouault / functions.php
Last active October 5, 2016 21:34 — forked from ThierryA/functions.php
Beans: split post image/content in two columns.
<?php
// Do not include the opening php tag if it is already included in your file.
add_action( 'wp', 'beans_child_setup_document' );
function beans_child_setup_document() {
// Only apply to non-singular layouts.
if ( !is_singular() ) {
@MatRouault
MatRouault / beans-fullwidth-post.php
Created October 3, 2016 20:51
Fullwidth post with featured image with overlay effect
<?php
add_action( 'wp', 'sps_custom_output' );
function sps_custom_output() {
if ( is_singular ( array ('post') ) ) {
/* Featured Image with Background Effect */
beans_add_attribute( 'beans_post_header', 'class', 'uk-cover-background uk-position-relative uk-contrast' );
https://community.getbeans.io/discussion/off-canvas-menus/#post-476
add_filter( 'beans_layout_grid_settings', 'example_modify_grid' );
function example_modify_grid( $args ) {
return array_merge( $args, array(
'grid' => 6,
'sidebar_primary' => 1,
'sidebar_secondary' => 1,
@MatRouault
MatRouault / beans-human-time.php
Created July 27, 2016 15:10
Change the post meta date/time to human difference format.
<?php
//https://community.getbeans.io/discussion/pretty-date/#post-1975
// Change the post meta date prefix.
add_filter( 'beans_post_meta_date_prefix_output', 'example_post_meta_date_prefix' );
function example_post_meta_date_prefix() {
echo 'Posted: ';
@MatRouault
MatRouault / change-beans-loop.php
Created July 26, 2016 06:19
Replace the entire loop with your own and use Beans post fragment functions in your HTML
<?php
//*https://community.getbeans.io/discussion/customize-post-view-on-index-php/#post-1737
beans_modify_action_callback( 'beans_loop_template', 'example_loop' );
function example_loop() {
if ( have_posts() && !is_404() ) : while ( have_posts() ) : the_post(); ?>