[Resolved] Custom Post Type with custom layout

Home Forums Support Custom Post Type with custom layout

  • This topic has 30 replies, 2 voices, and was last updated 10 months ago by Tom.
Viewing 15 posts - 16 through 30 (of 31 total)
  • Author
    Posts
  • #1111398
    Tom
    Lead Developer
    Lead Developer

    Let’s try this:

    remove_action( 'wpclubmanager_before_main_content', 'wpclubmanager_output_content_wrapper', 10);
    remove_action( 'wpclubmanager_after_main_content', 'wpclubmanager_output_content_wrapper_end', 10);
    
    add_action('wpclubmanager_before_main_content', function() {
        ?>
            <div id="primary" <?php generate_do_element_classes( 'content' );?>>
                <main id="main" <?php generate_do_element_classes( 'main' ); ?>>
                    <?php do_action( 'generate_before_main_content' ); ?>
                    <article id="post-<?php the_ID(); ?>" <?php post_class(); ?> <?php generate_do_microdata( 'article' ); ?>>
                        <div class="inside-article">
                            <?php do_action( 'generate_before_content' ); ?>
                            <div class="entry-content" itemprop="text">
        <?php
    } );
    
    add_action('wpclubmanager_after_main_content', function() {
        ?>
                            </div><!-- .entry-content -->
                            <?php do_action( 'generate_after_content' ); ?>
                        </div><!-- .inside-article -->
                    </article><!-- #post-## -->
                    <?php do_action( 'generate_after_main_content' ); ?>
                </main><!-- #main -->
            </div><!-- #primary -->
        <?php
    } ); 
    
    add_action( 'after_setup_theme', function() {
        add_theme_support( 'wpclubmanager' );
    } );
    #1111406
    tenchystryder

    Within the wp_head Tom and for entire site ?

    #1111410
    Tom
    Lead Developer
    Lead Developer
    #1111418
    tenchystryder

    Warning: array_key_exists() expects parameter 2 to be array, null given in /homepages/27/d767341814/htdocs/********/wp-content/plugins/wp-club-manager/templates/single-player/stats-table.php on line 30

    **** hidden website bit. Used snippets

    #1111421
    tenchystryder

    Ahhhhh …. sorted that. Info wasn’t added in

    #1111422
    tenchystryder

    Tom
    You are a friggin genius mate.

    Single profile page is spot on. Let me just get some more info in over next day or two so I can check for errors but looking good so far.

    UPDATED

    #1111431
    tenchystryder

    At the Bottom of that page Tom are 2 widgets (Archive and Search).

    That it seems is my right side bar Ha Ha

    #1111640
    tenchystryder

    Ok now I seem to be getting somewhere after about 5 hours of messing around.

    Apart from linking up on the menu and generally getting some data and colour into the site, my one and only question is can I move the footer widgets above the main content ?

    I know there are some threads on here about it but most are quite old now and I can’t find one with a solution. I have used the move top bar hack on my other site, can this be done with the footer widgets ?

    (or add a widget area above content) ?

    #1111807
    Tom
    Lead Developer
    Lead Developer

    Hmm, you could try this:

    add_action( 'wp', function() {
        remove_action( 'generate_footer', 'generate_construct_footer_widgets', 5 );
        add_action( 'generate_after_header', 'generate_construct_footer_widgets' );
    } );

    Let me know 🙂

    #1111900
    tenchystryder

    It worked but repeated the widgets so they were still in footer.

    Strangely, the plugin author did an update last night and one of the fixes was errors when certain content fields were empty, hence I was having to add data to get rid of them. So that is one issue resolved.

    Also, one of the theme conflicts is the sidebars appearing to the left under content. I have now resolved that.

    #1112475
    Tom
    Lead Developer
    Lead Developer
    #1112492
    tenchystryder

    That’s great Tom.

    Just need some space between the 3 widgets now and some centre alignment.

    Tried some custom css but not liking it 🙁

    #1112812
    Tom
    Lead Developer
    Lead Developer

    What about adding this?:

    .footer-widgets .widget {
        padding: 40px;
        text-align: center;
    }
    #1112930
    tenchystryder

    Thanks Tom. That’s perfect

    So with the plugin update this week and your amazing help, this has gone from a rough looking site to pretty much where I wanted it.

    I can’t thank you enough. 🙂

    Super support as always

    #1112955
    tenchystryder

    Post removed: Now sorted 🙂

Viewing 15 posts - 16 through 30 (of 31 total)
  • You must be logged in to reply to this topic.