- This topic has 25 replies, 2 voices, and was last updated 4 years, 12 months ago by Tom.
-
AuthorPosts
-
April 17, 2019 at 12:39 am #871198David
I have this at the moment…
<?php
/**
* The template for displaying posts within the loop.
*
* @package GeneratePress
*/if ( ! defined( ‘ABSPATH’ ) ) {
exit; // Exit if accessed directly.
}
?><?php
/**
* generate_after_entry_header hook.
*
* @since 0.1
*
* @hooked generate_post_image – 10
*/
do_action( ‘generate_after_entry_header’ );if ( generate_show_excerpt() ) : ?>
<?php else : ?>
<?php
the_content();wp_link_pages( array(
‘before’ => ‘‘ . __( ‘Pages:’, ‘generatepress’ ),
‘after’ => ‘‘,
) );
?><!– .entry-content –>
<?php endif;
?>
April 17, 2019 at 10:25 am #871821TomLead DeveloperLead DeveloperTry this:
add_filter( 'wp_get_attachment_image_attributes', function($attr) { if ( is_singular( 'team' ) ) { $attr['class'] .= ' modal-link iframe'; } return $attr; } );
Let me know ๐
April 18, 2019 at 1:06 am #872292DavidHi Tom
I’ve added this to the functions.php but no luck…
// ADD POP LINK TO TEAM ARCHIVE PAGE //
add_filter( ‘wp_get_attachment_image_attributes’, function($attr) {
if ( is_singular( ‘team’ ) ) {
$attr[‘class’] .= ‘modal-link iframe’;
}return $attr;
} );I’ve also got this in my functions.php, could it be affecting it…
// CROP SIZE OF TEAM FEATURED IMAGE IN ARCHIVE //
add_filter( ‘generate_blog_image_attributes’,’tu_variable_image_sizes’ );
function tu_variable_image_sizes( $atts ) {
// Set up our conditional
if ( is_post_type_archive( ‘team’ ) ) {
$atts[ ‘width’ ] = 800;
$atts[ ‘height’ ] = 553;
$atts[ ‘crop’ ] = true;
}// Return our options
return $atts;
}April 18, 2019 at 8:54 am #872760DavidHi Tom
I’m randomly now not seeing any off the team on the archive page.
Do you have any ideas why this could be?
Thanks
DaveApril 18, 2019 at 9:03 am #872772TomLead DeveloperLead DeveloperDid you change anything in the archive template? Looks like the grid is showing up, but nothing inside the grid elements.
April 18, 2019 at 9:06 am #872775DavidNope haven’t changed anything in the archive template – only think I’ve done is update the premium gp plugin, plus run a import for joomla to wordpress to import the news articles but nothing has changed on the team side of things.
April 18, 2019 at 4:10 pm #873045TomLead DeveloperLead DeveloperCan you show me your archive template? You can use GitHub Gists or pastebin to share the code.
April 23, 2019 at 7:41 am #876667DavidHi Tom
Im trying to set up remodal now on the archive page, to load the single page in to a pop up window…
https://github.com/VodkaBears/Remodal#remodal
Any ideas of what I need to do to get it to load the page in pop up.
Here is my archive page…
https://pastebin.com/rfn9xcrVThanks
DaveApril 23, 2019 at 5:09 pm #877040TomLead DeveloperLead DeveloperIs it possible to open an external page in the modal? I’m not familiar with that library.
April 24, 2019 at 4:51 am #877406DavidApril 24, 2019 at 7:34 am #877711TomLead DeveloperLead DeveloperAwesome! Looks great ๐
-
AuthorPosts
- You must be logged in to reply to this topic.