• Resolved weastpak

    (@weastpak)


    Hi,
    great stuff!
    But is there a possibility that i can display only the posts from one Subsite? Via SubSite ID for example?

    bye, and go on with the good work!

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter weastpak

    (@weastpak)

    The idea behind it:
    I wanna build a landing page where the last post of each subsite is displayed in a grid (e.g.). So I would use my pagebuilder to create a grid layout und put the shortcode in each box. In each box one subsite with it last post.

    bye

    • This reply was modified 6 years, 8 months ago by weastpak.
    • This reply was modified 6 years, 8 months ago by weastpak.
    Plugin Author Rick Hellewell

    (@rhellewellgmailcom)

    Yes, you can only show one item. Use the ‘items’ parameter, as in

    [mpr_display items=1]

    That will show the last post from all subsites.

    Thread Starter weastpak

    (@weastpak)

    Yes, but how can I display it in a grid or masonry? I search for the possibility to choose only one Subsite not all sites of the network. So I can create a box on the mainpage (e.g.) with the last post of subsite 2 and another box with the last post of subsite 3, and so on..
    It would be great if that would be possible with your plugin!

    bye

    sry, for my english. I’m from germany but I hope you understand what I mean

    • This reply was modified 6 years, 8 months ago by weastpak.
    Thread Starter weastpak

    (@weastpak)

    Thats an example of a blog grid widget by Divi but its only for normal Sites not for multisites but you can see waht I mean:
    http://pirling.net/blog-grid/

    Plugin Author Rick Hellewell

    (@rhellewellgmailcom)

    The plugin is ‘built’ for gathering posts from all subsites; sort of a ‘sub-site aggregator’. It will display the posts (or excerpts, depending on optional parameters) in a ‘post’ or a ‘page’, depending on where you put the shortcode.

    Since it is a ‘shortcode’, it is normally put in a post or page. However, you could use the code logic in the shortcode to display the content if you put this type of code inside a template:

    do_shortcode('mpr_display items=1');

    Then, you can style the content using your own custom CSS.

    If that doesn’t meet your needs, then you would need to create a template that would do a WP_QUERY to get the content from each of the subsites. That WP_QUERY would have to be in a loop, similar to the code that the plugin uses.

    Take a look at the plugin code to see how that it done: you have to get all of the subsite ID’s, then loop through each subsite with that WP_QUERY, outputting the results.

    Trying to do that is beyond the scope of the intent of the plugin. But looking at the code can show you how to build your own template that does what you want. (After all, I used the ideas from several other sources to build the code.)

    Plugin Author Rick Hellewell

    (@rhellewellgmailcom)

    …your request got me thinking… The next version will have the post content (title, date, content) surrounded by a <div class=”mpr_content”> so that you can add your own CSS to style how that is output.

    Should be ready in a couple of days (I have some other projects to be done first). That feature is now available in the version 1.20 update, just uploaded. Maybe that new feature will help.

    Thread Starter weastpak

    (@weastpak)

    Sounds really good. I will try it for sure!

    Do you know the “obsolete” plugin “Network Latest Post”? Unfortunately, it gives me no useful results, but it has the function that you can choose the subsite. Perhaps it is another source of inspiration for your excellent work

    Thank you for your quick and friendly help

    Plugin Author Rick Hellewell

    (@rhellewellgmailcom)

    I just uploaded version 1.21. It has new optional parameters to ‘includesite‘ and ‘excludesite‘. (Use one or the other.)

    I also fixed the problem of the shortcode ‘content’ always appearing at the top of the page/post.

    I also added a <div class='mpr_content'> around the content of the posts. And a <div class='mpr_header'> for the heading text (shows the selection criteria). That will allow you to use CSS to change those elements.

    Hope these help.

    Thread Starter weastpak

    (@weastpak)

    You are great! 😀

    Includesites works!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Show only 1 Subsite’ is closed to new replies.