Site: https://www.eat-clean.net
It does not work – nothing appears on the home page.
If I deactivate the plugin the shortcode appears as text.
I put the php code in a child theme that I got from
https://www.ads-software.com/support/topic/add-wp-shortcode-to-home-page?replies=6
I want the output to appear after the Feature Pages Widget area.
Code:
add_action('__after_loop' , 'print_my_shortcode_on_home');
function print_my_shortcode_on_home() {
//apply only on home page
if ( ! is_home() && !is_front_page() )
return;
do_shortcode('[cactus-masonry display_post_titles='true' display_post_excerpts='true' width='33.33%']' );
}
Thank you.
]]>I am having some trouble, this amazing plugin is only working in preview mode on a page but when I go directly to the page it does not load.
https://www.ads-software.com/plugins/masonry-post-gallery/
]]>I added a custom image field to the custom post pages that are being pulled into the masonry layout. I added the code to call the custom field with no problem.
The issue I’m having is the field should return the URL of the image. However, it is returning the attachment ID and creating a url that includes the page the gallery is on, not the actual post. Basically it spits out a url of “https://www.examplesite.com/gallery-page/166. (Where 166 is the attachment id). It should spit out a url of “https://www.examplesite.com/wp-content/uploads/2015/05/myimage.jpg”.
Under “global $post;” near line 330 of masonry-post-gallery.php I am calling the variable with:
$logoimage = get_post_meta($post->ID,”logo2″,true);
And then inside the databox I’m using the following:
if(self::$a[‘display_post_titles’] && strlen($tit) > 0) $data_text .= “<img src='{$logoimage}’ />”;
Please help me track down where the URL is switching from the image URL to the Attachment ID.
https://www.ads-software.com/plugins/masonry-post-gallery/
]]>I’m guessing it is too much to ask to use so many shortcodes within each other, but just wondering if there might be a trick around it? (I’m doing this as I’m trying to use the tabs as a way to filter the content).
A big big thank you to the team behind this plugin, it’s amazing and I love it!
https://www.ads-software.com/plugins/masonry-post-gallery/
]]>