Commit e131e118 authored by agnez's avatar agnez

widget area for member login page

parent a7168825
......@@ -15,17 +15,17 @@
/*enqueue_scripts*/
add_action( 'wp_enqueue_scripts', 'my_parent_theme_css' );
function my_parent_theme_css() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/css/bootstrap.css');
wp_enqueue_style( 'child-style', get_stylesheet_uri(), array( 'parent-style,bootstrap' ) );
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/css/bootstrap.css');
wp_enqueue_style( 'child-style', get_stylesheet_uri(), array( 'parent-style,bootstrap' ) );
}
/*enqueue_styles*/
// hook in late to make sure the parent theme's registration has fired so you can undo it. Otherwise the parent will simply enqueue its script anyway.
add_action('wp_enqueue_scripts', 'my_parent_theme_js', 100);
function my_parent_theme_js()
{
wp_dequeue_script('parent_theme_script_handle');
wp_enqueue_script('child_theme_script_handle', get_stylesheet_directory_uri().'/js/jquery.nivo.slider.js', array('jquery'));
wp_dequeue_script('parent_theme_script_handle');
wp_enqueue_script('child_theme_script_handle', get_stylesheet_directory_uri().'/js/jquery.nivo.slider.js', array('jquery'));
}
?>
......@@ -33,12 +33,12 @@ function my_parent_theme_js()
<?php
add_action( 'after_setup_theme', 'vs_thumbs' );
function vs_thumbs() {
add_theme_support( 'post-thumbnails' );
//set_post_thumbnail_size( 300, 150, true ); // default Post Thumbnail dimensions (cropped)
add_theme_support( 'post-thumbnails' );
//set_post_thumbnail_size( 300, 150, true ); // default Post Thumbnail dimensions (cropped)
// additional image sizes
add_image_size( 'imagebox', 600, 400, true );
add_image_size( 'pagethumb', 760, 200 ); //soft proportional crop mode
// additional image sizes
add_image_size( 'imagebox', 600, 400, true );
add_image_size( 'pagethumb', 760, 200 ); //soft proportional crop mode
}
?>
......@@ -80,6 +80,15 @@ function vs_widgets_init() {
'after_widget' => '</div>',
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>',
) );
register_sidebar( array (
'name' => __( 'Page Login espace membre', 'voisinssolidaires' ),
'description' => __( 'Widgets sur page spécifique avec slug "espace-membres"', 'voisinssolidaires' ),
'id' => 'widget-em',
'before_widget' => '<div id="espace-membres-widget">',
'after_widget' => '</div>',
'before_title' => '<b class="widget-title">',
'after_title' => '</b>',
) );
}
add_action( 'widgets_init', 'vs_widgets_init' );
......@@ -88,7 +97,7 @@ add_action( 'widgets_init', 'vs_widgets_init' );
<?php
// taxonomies
function vs_page_taxonomie() {
$labels = array(
$labels = array(
'name' => _x( 'Special functions', 'taxonomy general name', 'voisinssolidaires' ),
'singular_name' => _x( 'Special function', 'taxonomy singular name', 'voisinssolidaires' ),
'all_items' => __( 'All Special functions', 'voisinssolidaires' ),
......@@ -122,22 +131,12 @@ add_action( 'widgets_init', 'vs_widgets_init' );
add_action( 'init', 'vs_page_taxonomie',0 );
function vs_metaboxes() {
// Add category metabox to page
register_taxonomy_for_object_type('pagetaxo', 'page');
// Add category metabox to page
register_taxonomy_for_object_type('pagetaxo', 'page');
}
add_action( 'init', 'vs_metaboxes' );
?>
<?php
function redirect_non_logged_users_to_specific_page() {
if ( !is_user_logged_in() && $_SERVER['PHP_SELF'] != '/wp-admin/admin-ajax.php' ) {
wp_redirect( 'http://voisinssolidaires.be/index_dev.html', 301 );
exit;
}
}
//add_action( 'template_redirect', 'redirect_non_logged_users_to_specific_page' );
?>
<?php
// https://seventhqueen.com/blog/code-snippets/restrict-guest-users-from-accessing-buddypress-or-bbpress-pages.html
/**
......@@ -145,14 +144,14 @@ function redirect_non_logged_users_to_specific_page() {
*/
function vs_page_template_redirect()
{
//if not logged in and on a bp page except registration or activation
if( ! is_user_logged_in() &&
( ( ! bp_is_blog_page() && ! bp_is_activation_page() && ! bp_is_register_page() ) || is_bbpress() )
)
{
wp_redirect( home_url( '/register/' ) );
exit();
}
//if not logged in and on a bp page except registration or activation
if( ! is_user_logged_in() &&
( ( ! bp_is_blog_page() && ! bp_is_activation_page() && ! bp_is_register_page() ) || is_bbpress() )
)
{
wp_redirect( home_url( '/register/' ) );
exit();
}
}
add_action( 'template_redirect', 'vs_page_template_redirect' );
?>
......@@ -161,29 +160,29 @@ add_action( 'template_redirect', 'vs_page_template_redirect' );
// supprimer intitulé "catégorie" "tag" "autheur" https://wordpress.stackexchange.com/questions/179585/remove-category-tag-author-from-the-archive-title#answer-179590
add_filter( 'get_the_archive_title', function ($title) {
if ( is_category() ) {
if ( is_category() ) {
$title = single_cat_title( '', false );
$title = single_cat_title( '', false );
} elseif ( is_tag() ) {
} elseif ( is_tag() ) {
$title = single_tag_title( '', false );
$title = single_tag_title( '', false );
} elseif ( is_author() ) {
} elseif ( is_author() ) {
$title = '<span class="vcard">' . get_the_author() . '</span>' ;
$title = '<span class="vcard">' . get_the_author() . '</span>' ;
}
}
return $title;
return $title;
});
// disable access to wp-admin for non-administrators
function block_wp_admin_access() {
if ( is_admin() && ! current_user_can( 'administrator' ) && ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
wp_redirect( home_url() );
exit;
}
if ( is_admin() && ! current_user_can( 'administrator' ) && ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
wp_redirect( home_url() );
exit;
}
}
//add_action( 'init', 'block_wp_admin_access' );
<?php
/**
* The template for displaying all pages.
*
* This is the template that displays all pages by default.
* Please note that this is the WordPress construct of pages
* and that other 'pages' on your WordPress site will use a
* different template.
*
* @package multipurpose blog
*/
get_header(); ?>
<?php do_action( 'multipurpose_blog_header_page' ); ?>
<div id="content-blog" class="container">
<div class="middle-align">
<?php while ( have_posts() ) : the_post(); ?>
<h1><?php the_title();?></h1>
<?php if(has_post_thumbnail()) { ?>
<div class="feature-box">
<img src="<?php the_post_thumbnail_url('full'); ?>" width="100%">
</div>
<?php } ?>
<?php the_content();
wp_link_pages( array(
'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'multipurpose-blog' ) . '</span>',
'after' => '</div>',
'link_before' => '<span>',
'link_after' => '</span>',
'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'multipurpose-blog' ) . ' </span>%',
'separator' => '<span class="screen-reader-text">, </span>',
) );
//If comments are open or we have at least one comment, load up the comment template
if ( comments_open() || '0' != get_comments_number() )
comments_template();
?>
<?php endwhile; // end of the loop. ?>
<div class="clear"></div><?php
if( is_page( 'espace-membres' )) {dynamic_sidebar('widget-em');} ?>
</div>
</div>
<?php do_action( 'multipurpose_blog_footer_page' ); ?>
<?php get_footer(); ?>
\ No newline at end of file
......@@ -9,5 +9,5 @@
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: left-sidebar,right-sidebar,one-column,two-columns,three-columns,four-columns,grid-layout,custom-colors,custom-background,custom-logo,custom-menu,custom-header,editor-style,featured-images,footer-widgets,sticky-post,buddypress,full-width-template,front-page-post-form,theme-options,threaded-comments,translation-ready,rtl-language-support,blog,news,photography
Text Domain: voisinssolidaires
*/#header{background-image:none !important}#header .nav .menu-navigation-principale-container{margin:0 auto}#header .nav .menu-navigation-principale-container ul li a{border-bottom:solid 3px white;color:#666}#header .nav .menu-navigation-principale-container ul li a:hover{color:#e51566}#header .nav .menu-navigation-principale-container ul li ul li a{color:white}.home-page section{padding-bottom:0}.home-page #slider h2{font-size:48px;font-weight:bold;text-align:center}.home-page #slider .nivo-caption{left:10%;overflow:visible;padding:0 10px}.home-page #slider .nivo-caption .slide-cap{color:#197189}.home-page #slider .nivo-caption .slide-cap a.read-more{display:inline-block;background:white none repeat scroll 0 0;border:2px solid #e51566;border-radius:25px;color:#e51566;font-size:18px;font-weight:bold;padding:15px 45px}.home-page .darkbox{text-align:center}.home-page .darkbox .imagebox{position:relative}.home-page .darkbox .imagebox .contentbox h4{font-size:1.1rem;width:100%}.home-page .darkbox#photography .imagebox .contentbox h4{background:rgba(25,113,137,0.5) none repeat scroll 0 0}.home-page #page-content{margin-top:2em}.home-page #page-content .middle-align{min-height:0}#content-blog .wpcf7-form .form-group{border:2px solid #e51566;border-radius:15px;padding:2em}#content-blog .wpcf7-form p{line-height:1}#content-blog .wpcf7-form p span.wpcf7-list-item{display:block}#content-blog .wpcf7-form .wpcf7-not-valid-tip{margin:-1em 0 1em}div.wpcf7-validation-errors,div.wpcf7-acceptance-missing,div.wpcf7-response-output{border-radius:15px;padding:2em}div.wpcf7-validation-errors.wpcf7-mail-sent-ok,div.wpcf7-acceptance-missing.wpcf7-mail-sent-ok,div.wpcf7-response-output.wpcf7-mail-sent-ok{border:2px solid #197189}.footer-wp aside h3{font-size:20px;font-family:ClearSans,"Clear Sans",helvetica,tahoma,arial,sans-serif}.footer-wp aside ul li{padding:0}.inner .copyright-wrapper{font-size:1rem;font-weight:normal;background-color:white;padding:20px 0;position:relative;color:#666}.inner .copyright-wrapper p{color:#666}.inner .copyright-wrapper a{color:#e51566}.inner .copyright-wrapper h3{font-size:20px;letter-spacing:2px;text-align:center;font-weight:bold;letter-spacing:2px}.btn-primary{background-color:#e51566;border-color:#e51566}a{color:#e51566}h1,h2,h3,h4,h5,h6{font-family:ClearSans,"Clear Sans",helvetica,tahoma,arial,sans-serif}.nivo-directionNav,.nivo-controlNav{display:none}
*/#header{background-image:none !important}#header .nav .menu-navigation-principale-container{margin:0 auto}#header .nav .menu-navigation-principale-container ul li a{border-bottom:solid 3px white;color:#666}#header .nav .menu-navigation-principale-container ul li a:hover{color:#e51566}#header .nav .menu-navigation-principale-container ul li ul li a{color:white}.home-page section{padding-bottom:0}.home-page #slider h2{font-size:48px;font-weight:bold;text-align:center}.home-page #slider .nivo-caption{left:10%;overflow:visible;padding:0 10px}.home-page #slider .nivo-caption .slide-cap{color:#197189}.home-page #slider .nivo-caption .slide-cap a.read-more{display:inline-block;background:white none repeat scroll 0 0;border:2px solid #e51566;border-radius:25px;color:#e51566;font-size:18px;font-weight:bold;padding:15px 45px}.home-page .darkbox{text-align:center}.home-page .darkbox .imagebox{position:relative}.home-page .darkbox .imagebox .contentbox h4{font-size:1.1rem;width:100%}.home-page .darkbox#photography .imagebox .contentbox h4{background:rgba(25,113,137,0.5) none repeat scroll 0 0}.home-page #page-content{margin-top:2em}.home-page #page-content .middle-align{min-height:0}#content-blog .wpcf7-form .form-group{border:2px solid #e51566;border-radius:15px;padding:2em}#content-blog .wpcf7-form p{line-height:1}#content-blog .wpcf7-form p span.wpcf7-list-item{display:block}#content-blog .wpcf7-form .wpcf7-not-valid-tip{margin:-1em 0 1em}#content-blog #my-calendar select{width:auto}#content-blog #my-calendar input.button{padding:1em;border-radius:0.5}div.wpcf7-validation-errors,div.wpcf7-acceptance-missing,div.wpcf7-response-output{border-radius:15px;padding:2em}div.wpcf7-validation-errors.wpcf7-mail-sent-ok,div.wpcf7-acceptance-missing.wpcf7-mail-sent-ok,div.wpcf7-response-output.wpcf7-mail-sent-ok{border:2px solid #197189}.footer-wp aside h3{font-size:20px;font-family:ClearSans,"Clear Sans",helvetica,tahoma,arial,sans-serif}.footer-wp aside ul li{padding:0}.inner .copyright-wrapper{font-size:1rem;font-weight:normal;background-color:white;padding:20px 0;position:relative;color:#666}.inner .copyright-wrapper p{color:#666}.inner .copyright-wrapper a{color:#e51566}.inner .copyright-wrapper h3{font-size:20px;letter-spacing:2px;text-align:center;font-weight:bold;letter-spacing:2px}.btn-primary{background-color:#e51566;border-color:#e51566}a{color:#e51566}h1,h2,h3,h4,h5,h6{font-family:ClearSans,"Clear Sans",helvetica,tahoma,arial,sans-serif}.nivo-directionNav,.nivo-controlNav{display:none}
/*# sourceMappingURL=style.css.map */
{
"version": 3,
"mappings": "AAAA;;;;;;;;;;;EAWE,AAGF,OAAO,CACN,gBAAgB,CAAE,eAAe,CAEhC,kDAAqC,CACpC,MAAM,CAAC,MAAM,CAEZ,0DAAE,CACD,aAAa,CAAE,eAAe,CAC9B,KAAK,CClBL,IAAO,CDmBP,gEAAO,CACN,KAAK,CCvBN,OAAO,CD2BP,gEAAE,CACD,KAAK,CAAC,KAAK,CAWhB,kBAAQ,CACN,cAAc,CAAE,CAAC,CAGlB,qBAAG,CACF,SAAS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
"names": [],
"file": "style.css"
......
......@@ -106,6 +106,16 @@
margin: -1em 0 1em;
}
}
#my-calendar{
select {
width: auto;
}
input.button{
padding:1em;
border-radius:0.5;
}
}
}
div.wpcf7-validation-errors,
div.wpcf7-acceptance-missing,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment