Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • in reply to: Sidebar Menu #93500
    Tatsujin
    Participant

    Excellent, thank you. Just wanted to make sure.

    in reply to: Move widget position #86174
    Tatsujin
    Participant

    Perfect, that got it!

    Thanks for all your help! 🙂

    in reply to: Move widget position #86116
    Tatsujin
    Participant

    On the home page, it’s currently appearing above/before this code:

    <section class=”post-1512 post type-post status-publish format-standard hentry category-home”>
    <article class=”full-width”> content goes here </article>
    <!– .post-article –>
    </section>

    We need it to appear directly after/below this code.

    In the functions.php file we have this currently:

    <?php
    /**
    * Child Theme functions and definitions
    *
    */

    /**
    * Loading Parent theme stylesheet
    *
    */
    add_action( ‘wp_enqueue_scripts’, ‘simplecatch_child_enqueue_styles’ );
    function simplecatch_child_enqueue_styles() {
    wp_enqueue_style( ‘simplecatch-parent-style’, get_template_directory_uri() . ‘/style.css’ );
    }

    function simplecatch_child_widgets_init() {

    /* Register Widgets */
    //Below Header
    register_sidebar( array(
    ‘name’ => __( ‘Below Header’, ‘simple-catch’ ),
    ‘id’ => ‘below-header’,
    ‘description’ => __( ‘This is Below Header widget area’, ‘simple-catch’ ),
    ‘before_widget’ => ‘<aside id=”%1$s” class=”widget %2$s”>’,
    ‘after_widget’ => ‘</aside>’,
    ‘before_title’ => ‘<h3 class=”widget-title”>’,
    ‘after_title’ => ‘</h3><hr/>’
    ) );
    //After Main Content
    register_sidebar( array(
    ‘name’ => __( ‘After Main Content’, ‘simple-catch’ ),
    ‘id’ => ‘after-content’,
    ‘description’ => __( ‘This is After Main Content widget area’, ‘simple-catch’ ),
    ‘before_widget’ => ‘<aside id=”%1$s” class=”widget %2$s”>’,
    ‘after_widget’ => ‘</aside>’,
    ‘before_title’ => ‘<h3 class=”widget-title”>’,
    ‘after_title’ => ‘</h3>’
    ) );

    //Widget for slider in homepage
    register_sidebar( array(
    ‘name’ => __( ‘Homepage Slider’, ‘simple-catch’ ),
    ‘id’ => ‘homepage-slider’,
    ‘description’ => __( ‘This is Homepage Slider Content widget area’, ‘simple-catch’ ),
    ‘before_widget’ => ‘<aside id=”%1$s” class=”widget %2$s”>’,
    ‘after_widget’ => ‘</aside>’,
    ‘before_title’ => ‘<h3 class=”widget-title”>’,
    ‘after_title’ => ‘</h3>’
    ) );
    }
    add_action( ‘widgets_init’, ‘simplecatch_child_widgets_init’ );

    function simplecatch_child_below_header_widget(){
    simplecatch_menu(); //Remove this function if you do not want the primary menu
    if ( is_active_sidebar( ‘below-header’ ) ) {
    dynamic_sidebar( ‘below-header’ );
    }
    }
    add_action( ‘simplecatch_after_headercontent’, ‘simplecatch_child_below_header_widget’, 16 );

    add_action( ‘init’ , ‘simplecatch_child_remove_primary_menu’);
    function simplecatch_child_remove_primary_menu() {
    remove_action( ‘simplecatch_after_headercontent’, ‘simplecatch_menu’, 15 );
    }

    function simplecatch_child_after_content_widget(){
    if ( is_active_sidebar( ‘after-content’ ) ) {
    dynamic_sidebar( ‘after-content’ );
    }
    }
    add_action( ‘simplecatch_child_after_content’, ‘simplecatch_child_after_content_widget’, 10 );

    function simplecatch_child_homepage_slider_widget(){
    if ( is_active_sidebar( ‘homepage-slider’ ) ) {
    dynamic_sidebar( ‘homepage-slider’ );
    }
    }
    add_action( ‘simplecatch_child_before_content’, ‘simplecatch_child_homepage_slider_widget’, 10 );

    function simplecatch_content() {
    global $post;

    if ( is_attachment() ) {
    $parent = $post->post_parent;
    $layout = get_post_meta( $parent,’simplecatch-sidebarlayout’, true );
    } else {
    $layout = get_post_meta( $post->ID,’simplecatch-sidebarlayout’, true );
    }

    if( empty( $layout ) )
    $layout=’default’;

    get_header();

    global $simplecatch_options_settings;
    $options = $simplecatch_options_settings;
    $themeoption_layout = $options[‘sidebar_layout’];

    while ( have_posts() ):the_post();

    if ( function_exists( ‘simplecatch_loop’) ) simplecatch_loop();

    comments_template();

    endwhile; ?>
    <?php do_action( ‘simplecatch_child_after_content’ ); ?>
    </div><!– #primary –>

    <?php
    /**
    * simplecatch_below_primary hook
    */
    do_action( ‘simplecatch_below_primary’ );
    ?>

    <?php
    if ( $layout == ‘left-sidebar’ || $layout == ‘right-sidebar’ || ( $layout==’default’ && $themeoption_layout == ‘left-sidebar’ ) || ( $layout==’default’ && $themeoption_layout == ‘right-sidebar’ ) ) {
    get_sidebar();
    }

    get_footer();

    }

    in reply to: How to add new widget areas #85068
    Tatsujin
    Participant

    OK, I’ve gone through all the steps to create a child theme, but now I’ve got nothing displaying in the front end and no theme options in admin.

    I’ve obviously done something wrong here, can I send you some details to take a quick look if you don’t mind.

    Is there a way here to hide these details from public view or send them to you privately?

    For the 3rd point I posted about, it currently displays latest posts on the home page, we don’t want this, we want to have a slider there but can’t add it as there’s no “main content” widget area to add it to.

Viewing 4 posts - 1 through 4 (of 4 total)