Shape 5

Wordpress Club Plugins => Masonry - Club => : cspub January 06, 2016, 06:58:45 PM



: error when displaying on page
: cspub January 06, 2016, 06:58:45 PM
i set it up and it was installed with site shaper. i get the following error message when i try to display anything using it.
Warning: Invalid argument supplied for foreach() in /home/tennis/public_html/team_news/wp-content/plugins/s5-masonry/tmpl/default.php on line 55

any ideas of what i should be looking for


: Re: error when displaying on page
: Tristan Rineer January 07, 2016, 10:16:45 AM
That line in the code is where Masonry loops through the posts.  The only reason I can think of that it would give that error would be if you have Masonry placed but it doesn't have any posts to display.


: Re: error when displaying on page
: cspub January 07, 2016, 10:20:30 AM
That line in the code is where Masonry loops through the posts.  The only reason I can think of that it would give that error would be if you have Masonry placed but it doesn't have any posts to display.

i have post in all the categories and tried selecting multiple categories. i can try adding more post.


: Re: error when displaying on page
: Tristan Rineer January 11, 2016, 06:43:42 AM
Did you try adding more posts?  If so, did it work?

It would also help if I knew which shaper you used, as there have been recent updates to the plugin.  I recommend downloading the latest version of the plugin and seeing if the problem is solved by updating. 

Also: please remember to always include a link to your site when posting a support request; being able to see the problem helps me figure out what's happening.


: Re: error when displaying on page
: cspub January 11, 2016, 09:18:16 AM
i added more but now see the issue. i had it set to load more and there weren't any more to show. it works now except the background is white so the text doesn't show, except the links. i have it set to default like the one in site shaper.

http://matchmakers2.com/team_news/

it is the one in position top row 1.1


: Re: error when displaying on page
: cspub January 11, 2016, 02:52:15 PM
i had to add images to keep it from showing blank white. i sized my images the same as in site shaper demo, but they show a lot of blank white space. the original image does have white space surrounding the image on all sides. but this didn't size as your demo.
http://matchmakers2.com/team_news/


: Re: error when displaying on page
: Tristan Rineer January 12, 2016, 07:42:14 AM
When you added the images to the posts, it appears that you had the 150x150px size selected; you'll want to re-select the images and make sure that the "original" size option is selected.


: Re: error when displaying on page
: cspub January 12, 2016, 02:06:54 PM
when i add featured image it doesn't give option to set size. i go to image in media and it shows full size. is there somewhere else to look at where it is setting to thumbnail?


: Re: error when displaying on page
: Tristan Rineer January 13, 2016, 08:34:21 AM
If you add the following code to the functions.php for the theme, it will force the post images to use the original size:

:
	function vertex_filter_image_sizes( $sizes) {

unset( $sizes['thumbnail']);
unset( $sizes['medium']);
unset( $sizes['large']);
unset( $sizes['wysija-newsletters-max']);

return $sizes;
}
add_filter('intermediate_image_sizes_advanced', 'vertex_filter_image_sizes');

function vertex_custom_image_sizes($sizes) {
$myimgsizes = array(
"image-in-post" => __( "Image in Post" ),
"full" => __( "Original size" )
);
return $myimgsizes;
}
add_filter('image_size_names_choose', 'vertex_custom_image_sizes');

I'll have to do more research into how to enable selecting image size in the featured image selector, but this should do what you need for now.


: Re: error when displaying on page
: cspub January 13, 2016, 09:58:04 AM
i added it to the end of the page but still same thing. when i did research on the featured image everything says it shows in thumbnail unless the theme has it controlled in css.


: Re: error when displaying on page
: Tristan Rineer January 13, 2016, 10:01:10 AM
The code needs to be added to the functions.php, not the page.  That code is what I use on my dev site to disable WP from creating multiple image sizes, so it definitely works, or the demo wouldn't look right.  You may have to remove the existing imaged from the media library and re-upload them though.


: Re: error when displaying on page
: cspub January 13, 2016, 11:06:38 AM
i added to the functions.php page inside the theme folder for fitness. you were correct. you have to delete the images and reload.
question, so if you don't check option to display the images, does it just show the white box? how do you change that since the text is white.


: Re: error when displaying on page
: Tristan Rineer January 14, 2016, 10:20:27 AM
I've forwarded this thread to the designer who worked on the theme, it'll probably just be a styling adjustment, but we'll have to wait for a response.


: Re: error when displaying on page
: Tristan Rineer January 14, 2016, 11:48:50 AM
Here's the response: 

The theme is designed to use images with the hover overlay.

To have just text with images, set "Default Layout or Hover Overlay?" to "Default" and remove this code from template.css so the text is no longer white:

:
.s5_mason_abi_wrap .s5_masonry_articletitle a, .s5_mason_abi_wrap .s5_masonry_articletitle {
    color: #ffffff !important;
}


That's around line 1350