On my top page (running with a child theme of Vantage) I have Page Builder with just one row and two widgets: a Post Loop and a simple Text widget with a shortcode for the Custom Facebook Feed plugin. (Mega Slider is being invoked as a page attribute, not in Page Builder, and the stuff on the right is just the theme sidebar.) As you can see, because the space is so narrow, the Post Loop is typically very long even with only 4 posts per page, since photos that would go side by side end up stacked vertically. The Facebook feed automatically crops with a Read More link, so it’s always pretty short. It would help if I could use the space under the Facebook area for the remainder of the Post Loop contents – in CSS terms, I’Il like the Facebook feed to be “float:right” or something like that. Is that possible while still using Page Builder? Without Page Builder I don’t know how to get a post loop on the page. Meanwhile I’ll try to train my author/editors to use “Read More” to shorten what shows of the posts, but that’ll be a learning curve, and they will probably still want to show photos.
Wrap one widget around another?
Notice: This thread is over two years old; the information may be outdated. Please consider creating a new thread if you require free support. If you have an active SiteOrigin Premium license, you can email our premium support desk at [email protected].
This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.
Hi OsakaWebbie
Thanks for reaching out. I can’t think of a way around this using CSS. What we could do is use two Post Loop widgets, hide the pagination in the first one and offset the second one to display posts after the first two in the loop. This might not look perfect so we’d need to just test it out.
The page layout would need to be changed, it would look like this:
Row One:
Cell One | Cell Two
Row Two:
Cell One – 100%
In the first Post Loop widget, edit the Query Builder and enter a value of 2 for Posts per page.
In the second Post Loop widget, insert the following into the last field titled Additional:
Finally, edit the first Post Loop widget and click the Attributes field top right. Insert the following in the Widget Class field:
Then go to Appearance > Custom CSS and insert:
Thanks for the idea. But the length of the posts is highly variable, so I’m not thrilled about picking a fixed number like 2 for a cutoff.
I’m wondering if I should try to do this without Page Builder. It’s trivial to put the Facebook shortcode in a floating div, but I don’t know how to then include a posts loop. I don’t need pagination (in fact, I would prefer it not there) – if it can just show anything sticky plus the newest normal posts (up to about 4 posts, perhaps), that’s fine, because all the rest is accessible by navigation and widgets. But is there a way in the Vantage theme to do that? https://codex.wordpress.org/Creating_a_Static_Front_Page says to have a front_page.php template, but it doesn’t appear that Vantage has that, at least not with that filename. Is there a template for this in the theme somewhere? Or would I need to write a template or install a plugin to give me a posts loop? (Yes, I do write PHP, but I’m not very familiar with WordPress’s inner workings.)
I just discovered another reason why I don’t want pagination on the front page: It doesn’t work! No matter what page you attempt to go to, even though the URL correctly says something like http://crashjapan.com/en/page/2 , you still just get the first page of posts. I don’t know if that’s a bug in the Post Loop widget, something in the theme, or the fact that it’s the front page (the Codex page cited in my previous message says that pagination won’t work on a static front page), but I thought you’d want to know about it.
Let’s try work this pagination issue first. It should work.
1. Go to Settings > Permalinks and click Save.
2. Create a new test page and insert a Post Loop widget, does the pagination work?
3. If the pagination does work on your test page then there might be a conflict with one of the other widgets used on that page. On your test page click Prebuilt, clone the home page and start one by one removing the other widgets, running a test after each removal.
Let me know how this goes.
I did steps 1 and 2, and pagination worked fine. But then I designated that new page as the Front Page (in Settings->Reading; I don’t use the Vantage Settings’ “Home Page”), and it quit working. I probably should have tested that theory before writing to you the last time, but I was hesitant to disrupt the live site too much. But now it’s proven – just as the Codex says, pagination doesn’t work on the Front Page, even if the post loop is inside a widget in Page Builder.
But as I said, I personally don’t need pagination; I just want a handful of the latest posts (preferably honoring sticky post status) that can flow around a float.
Sorry for not explaining this. The Codex in this case isn’t applicable to our widget, it’s referring to a regular posts page and pagination within that. Your pagination should be working.
Have you tried step 3 of testing I suggested above? Basically clone the home page test pagination.
I didn’t need to go to Step 3. The evidence was already clear. After I made the really simple test page in Step 2 and verified that it worked when just an ordinary page, I went to Settings->Reading and set the Static Front Page to use it instead of the one I had with the Facebook feed. That not only caused pagination on my simple test page to stop working, it also caused pagination on the page with the Facebook feed to START working since it was not longer set as the Front Page. I didn’t need to clone it to see that. I tested it again just now just to make sure. The only thing that affects whether pagination works or not is whether it is set to be the Front Page. Your belief that your widget is immune to the WordPress Front Page effects is simply wrong. Try it yourself – set any page that has a working Post Loop widget to be the Front Page and see what happens if you click Next at the bottom.
I know that Appearance->Home Page (title: Custom Home Page) is another way that a home page (aka front page) can be set for a Vantage-powered site. It’s possible that your experience with operational pagination has been while using that method. But I can’t do it that way because it doesn’t allow the Polylang plugin to manage an English version and Japanese version for my bilingual site.
Can we please move on to my question? I don’t care about pagination – I just wanted to help you guys out with feedback. Actually, one sentence in your last message is related to what I’m trying to ask: “The Codex in this case isn’t applicable to our widget, it’s referring to a regular posts page and pagination within that.” How does one get what you’re calling a “regular posts page”? If I knew that, I could probably add a simple float with a shortcode to it.
Thanks for your feedback.
There is a local challenge in your WordPress installation causing pagination to fail in the Post Loop widget. I’d be happy to login and troubleshoot the pagination challenge for you assuming it’s something you’d like to solve. To demonstrate that the Post Loop widget pagination does work on the static front page, please, see the video below:
View larger version of video
More than happy to move on though. We’re here to assist with whatever challenge you’d like help on.
In my earlier message, when I said “regular posts page”, I’m just referring to any post or page managed in the normal WordPress editor. In any page managed by Page Builder you can click “Switch to editor”. Page Builder formatting will be lost and all available content inserted into the regular Visual tab. The page then becomes a regular WordPress page. No widgets can be inserted into the page area.
You can also insert floats or shortcodes into a Page Builder page using the Text or SiteOrigin Editor widget.
Hmm, now you have me curious. When you demonstrated the Post Loop widget in your screencast, it looked different than mine. Am I using a different widget? See a screenshot of my Post Loop’s edit area at http://crashjapan.com/post-loop.png
In your description of a “regular posts page” you’re focused on the word “regular”, but I’m interested in the term “posts page”. The first time you used the term, the whole context was, “regular posts page and pagination within that.” If it has pagination, it must have multiple posts on it (a post loop). I want to know how to do that. Or are you only talking about archives, which use a specific template?
You’re using an older version of the Post Loop widget. The results should be the same though. Head over to Dashboard > Updates to see if there are any SiteOrigin updates available.
With regards to your second paragraph. I was just using words to describe the difference between any page or post managed in the WordPress Visual / Text tabs vs managed in Page Builder, nothing more.
WordPress automatically adds pagination to the blog page which can assign from Settings > Reading and to all archive pages. If the front page is set to display latest posts, also done from Settings > Reading, then pagination will be displayed there too.
The only way to add a loop somewhere, beyond the above regular WordPress methods, is to use a Post Loop widget in Page Builder.