- This topic has 30 replies, 2 voices, and was last updated 5 years, 1 month ago by Tom.
-
AuthorPosts
-
December 22, 2019 at 10:07 am #1111398TomLead DeveloperLead 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' ); } );
December 22, 2019 at 10:20 am #1111406tenchystryderWithin the wp_head Tom and for entire site ?
December 22, 2019 at 10:23 am #1111410TomLead DeveloperLead DeveloperUsing one of these methods: https://docs.generatepress.com/article/adding-php/
December 22, 2019 at 10:32 am #1111418tenchystryderWarning: 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
December 22, 2019 at 10:37 am #1111421tenchystryderAhhhhh …. sorted that. Info wasn’t added in
December 22, 2019 at 10:40 am #1111422tenchystryderTom
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.
December 22, 2019 at 10:58 am #1111431tenchystryderAt the Bottom of that page Tom are 2 widgets (Archive and Search).
That it seems is my right side bar Ha Ha
December 22, 2019 at 3:00 pm #1111640tenchystryderOk 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) ?
December 22, 2019 at 8:37 pm #1111807TomLead DeveloperLead DeveloperHmm, 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 π
December 22, 2019 at 11:38 pm #1111900tenchystryderIt 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.
December 23, 2019 at 9:38 am #1112475TomLead DeveloperLead DeveloperJust updated the code above – it should remove the footer widgets: https://generatepress.com/forums/topic/custom-post-type-with-custom-layout/page/2/#post-1111807
December 23, 2019 at 9:57 am #1112492tenchystryderThat’s great Tom.
Just need some space between the 3 widgets now and some centre alignment.
Tried some custom css but not liking it π
December 23, 2019 at 7:17 pm #1112812TomLead DeveloperLead DeveloperWhat about adding this?:
.footer-widgets .widget { padding: 40px; text-align: center; }
December 24, 2019 at 12:13 am #1112930tenchystryderThanks 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
December 24, 2019 at 1:16 am #1112955tenchystryderPost removed: Now sorted π
-
AuthorPosts
- You must be logged in to reply to this topic.