- This topic has 25 replies, 2 voices, and was last updated 3 years, 11 months ago by
Tom.
-
AuthorPosts
-
April 8, 2019 at 2:26 am #862611
David
Hello
I’ve set up a new custom post type called team.
I’ve then created a archive-team.php page and put that in the child theme – I’m then looking at changing the layout of the archive team page so have copied over the content page and renamed it content-team.php and put in to child theme folder.
When I make any changes to the content-team.php page though, nothing changes!
http://185.20.51.60/~skyworldco/team/
Please help.
Thanks
DaveGeneratePress 2.2.2April 8, 2019 at 8:42 am #863032Tom
Lead DeveloperLead DeveloperHi there,
In your
archive-team.php
file, replace this line: https://github.com/tomusborne/generatepress/blob/2.2.2/archive.php#L42With this:
get_template_part( 'content', 'team' );
Let me know if that helps or not ๐
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentApril 8, 2019 at 8:46 am #863039David
Great, thanks – how can I get the team custom posts to show in descending order?
Thanks
DaveApril 8, 2019 at 3:58 pm #863358Tom
Lead DeveloperLead DeveloperYou could try something like this:
add_action( 'pre_get_posts', function( $query ) { if ( $query->is_main_query() && ! is_admin() ) { if ( $query->is_post_type_archive( 'team' ) ) { $query->set( 'order', 'DESC' ); } } } );
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentApril 8, 2019 at 11:32 pm #863549David
Thanks Tom
April 9, 2019 at 5:54 am #863826David
Hi Tom
What file would I need to copy across to edit this page…
http://185.20.51.60/~skyworldco/team/chris-beer/I’ve sorted the archive page http://185.20.51.60/~skyworldco/team/chris-beer/
Thanks
DaveApril 9, 2019 at 8:46 am #864176Tom
Lead DeveloperLead DeveloperThat’s the
single.php
file ๐Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentApril 9, 2019 at 9:25 am #864234David
So how would I go about making this appear in 2 columns? so the featured image is to the left?
I can’t see the code for this in single.php
April 9, 2019 at 3:22 pm #864470Tom
Lead DeveloperLead DeveloperThe featured image is hooked into the template, so you would have to disable the featured image and then add it manually to the template.
What kind of layout are you going for? Any examples of what you want vs what you have?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentApril 9, 2019 at 11:22 pm #864641David
Trying to create this…
Haven’t thought about how to do the pop up yet, just trying to get the layout of the team member correct.
Thanks
DaveApril 10, 2019 at 10:01 am #865277Tom
Lead DeveloperLead DeveloperAnd what do you have so far? Will you end up adding it as a popup?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentApril 10, 2019 at 10:21 am #865302David
I have this so far…
http://185.20.51.60/~skyworldco/team/chris-beer/
Yes the aim is to get it to open in a pop up once I’ve got the layout sorted
Thanks
DaveApril 10, 2019 at 4:20 pm #865498Tom
Lead DeveloperLead DeveloperYou could try this CSS:
.single-team .featured-image { float: left; max-width: 50%; margin-right: 2em; } .single-team .entry-content { overflow: hidden; }
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentApril 16, 2019 at 7:08 am #870586David
Hi Tom
How do I add this class… class=”modal-link iframe” to the href tag on the images of the archive for my team page…
http://185.20.51.60/~skyworldco/team/
Thanks
DaveApril 16, 2019 at 1:54 pm #870949Tom
Lead DeveloperLead DeveloperHow are you adding those images?
the_post_thumbnail()
?Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-development -
AuthorPosts
- You must be logged in to reply to this topic.