Jump to content
stebac

Loops Configuration Trouble - Displaying posts.

Recommended Posts

stebac

Hello.

I am currently redesigning my blog foodandfitness.co.uk with Platform 5.

I planned to heavily use the loops section to help me achieve my desired look and functionality.

My question...

Is the Loops section controlled by the Wordpress 'reading' settings for how many posts can be displayed in a loop? I see the options in the loops section that potentially allows me to display up to 32 posts before pagination appears. But these options appear to be overridden by the Wordpress settings in 'reading'.

I wanted to display 6 of my 'most recent' posts from a category on my home page and then 20 posts on the actual category landing page before any pagination appeared.

As an example you can see on my home page the first posts displayed are 'latest nutrition articles' - i have these set to display 6 in the page editor. Then on the nutrition category i have it set to display 20 in the page editor, but only 6 show up and its starts to paginate.

Whatever i set my Wordpress reading settings (blog post shows) to is what i get from the loops section (currently set as 6).

Am i missing something in terms of configuration? Or perhaps misunderstanding or overestimating Loops capabilities?

If it is controlled by the Wordpress settings it seems pointless to have the option to set how many you would like from the page editor?

Is what i want to achieve possible?

Thanks in advance for your time.

 

Share this post


Link to post
Share on other sites
chrisayers

Try using a CPT section like showcase grid or the new post grid on home and then loops on the other. There are a few ways to skin a mule lets try a few other tools in the box.

 

 

 

"If a screwdriver does not work try a hammer."
Chris Ayers
Owner World Webscapes

Share this post


Link to post
Share on other sites
reklov79

Hi,

hmm - I think that might be really difficult to achieve just with the loop section.

What I use instead of the loop section: wp-types -> views (https://wp-types.com/home/toolset-components/) - I don't use their layout or CRED plugins as Pagelines is here way better in my opinion (thats also the core of what pagelines platform 5 wants to achieve I believe), but when it comes to making flexible, even searchable, sortable, ... loops I would go with views. I have it on my site, the views plugin and framework and platform 5 work smooth together. Simply add a embed section and add the views shortcode there.

Hope that helps,

Volker

 

Share this post


Link to post
Share on other sites
stebac

Hello again.

Thank you both for your input and help, i'm grateful.

I managed to figure out my problem tonight. In the midst of changing over to Platform 5 and getting carried away with all the new features i forgot about the basic setup of my blog. I still had my home page to display the blog roll, hence why the reading settings were taking over and forcing loops to display the same amount of posts as the category pages.

I suddenly realised today and have since changed my home page to static - which gives me all the freedom i need to play with and configure loops. So i now have 6 posts displaying from each category on my home page, and within the category pages i have 20 posts displaying.

I have finally managed to achieve exactly what i wanted with Loops.

 

@chrisayers I would have used your suggestion as a last resort as i really did want to use loops for the majority of my blog layout, i did have plans for the other tools - such as creating a featured post section at the top of my blog, which i have now done using post grid and things are starting to come together nicely: foodandfitness.co.uk.

@reklov79 Thanks for the tools you have shared, i will look into this with more it looks really useful.

 

Thanks again guys, really appreciated.

 

Share this post


Link to post
Share on other sites
Thijs

Hi @stebac,

I got the same error with the Platform 5 - "Loop section".

In the options of the "Loop section" there is a checkbox:

"Use default query object?"

Quote

If selected Loops will use the standard query object provided by WordPress and all the query options below will be ignored. You can use this option on search pages, archives etc.

I want to use the custom query of the "Loops section" so I leave the checkbox unmarked.

As next I selected a post type, taxonomy and set the post per page to 4.

After saving and refreshing the loop still shows 10 posts as defined in the Wordpress Readings Settings.

So even if the query checkbox is unmarked, the custom loop query gets overridden.

Any idea's @Simon?

Share this post


Link to post
Share on other sites
Thijs

Found the solution:

I am also using the plugin Toolset Types Wordpress plugin.

After unchecking the "has archive" option of my custom post type the loop works as expected.

(The page where I wanted to display the "Loop section" was the archives page of my custom post type so I fully understand why the query got overridden.)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×