Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Maybe I'm doing this the long way but I need to make something like this:

<?php echo do_shortcode('[mu-events months="11" startmonth="today" orderby="time" orderas="ASC" sites="?> <?php get_current_site();?> <?php"]'); ?>
<?php echo do_shortcode('[mu-events months="11" startmonth="today" orderby="time" orderas="ASC" sites="11"]'); ?>

I guess I simply don't know if a function can be inserted inside a shortcode, but in this case it seems like it just has the incorrect syntax.

Appreciate any pointing in the right direction!
Thanks

NOTE There is a different between CURRENT_SITE and current BLOG_ID, see my note below

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

You could do it in this way.

echo do_shortcode('[mu-events months="11" startmonth="today" orderby="time" orderas="ASC" sites="' . get_current_site() . '"]'); 
share|improve this answer
    
Would love to hear if this actually works. –  Snekse Dec 5 '11 at 23:21
    
ya it works!! BUT ive had to change get_current_site to get_current_blog_id after much confusion why it was always showing the parent ID. –  petergus Dec 6 '11 at 16:11
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.