Jump to content

Archived

This topic is now archived and is closed to further replies.

oliverwood

A menu to allow visitors to change order of boxes by date and title

Recommended Posts

oliverwood

Hi,

 

After looking through the forums and extensive web searches I'm still no closer to understanding how to achieve this:

 

I have boxes (lots of them) on my index page (they are all in the same box category) and would like to add a two button menu that allows visitors to display (filter) the boxes in different orders – specifically, by date and alphabetically by title.

 

I'm sure there must be a simple method of doing this but I can't find a plugin / section / extension that seems to. I've come across various articles describing such things as querying posts, rewriting urls and executing orderby functions but nothing that helps me to understand which is the best method nor how to actually implement the solution.

 

 

If anyone could help I'd really appreciate it.

 

 

Using PL Framework 2.4.4 on Wordpress 3.6

 

Thanks in advance,

Ollie

 

 

Share this post


Link to post
Share on other sites
greenfly

Can we have a link to your site so we can see how this works currently 


The answer to many issues can be found by searching in the forum before posting as someone else  may very well have had the same problem before you have.  Also, reading the documentation can help you gain a good understanding of how everything works. 

 

Please do not send me private messages. Occam's razor - The principle states "Keep things simple!"

Share this post


Link to post
Share on other sites
James B

Hi there, check out - http://www.pagelines.com/shop/sections/filtering/ I don't think this works with iboxes, but if you set the content up as posts with images on top this plugin should do the trick.


Kindly search the forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

James B

Share this post


Link to post
Share on other sites
oliverwood

Hi James,

 

Thanks for the reply. I'd already tried the Filtering section and – unless I'm missing something – it only allows me to set one 'orderby' setting which is where I need the flexibility.

 

I imagined that I might be able to put some php functions in the customize functions file and then action them from some links coded into a content box? I have no idea how to do that though. Any ideas?

 

Thanks,

Ollie

Share this post


Link to post
Share on other sites
James B

Hi there, I'm not sure to be honest only the product author would be able to advise if that was possible. I have copied in ellenmva who is the Developer for filtering who might be able to advise further for you.


Kindly search the forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

James B

Share this post


Link to post
Share on other sites
oliverwood

Thanks James, but just to clarify, I didn't mean I was wondering how to amend the Filtering plugin but rather whether there was a different solution entirely.

Share this post


Link to post
Share on other sites
oliverwood

Not sure I'm thinking about this in the correct way but couldn't I add something like the code below to my functions.php file and then sort of somehow add a button to the site that executes this? And then add another function (to reorder by date) and another link on the front end?

 

 
function foo_modify_query_order( $query ) {
    if ( $query->is_home() && $query->is_main_query() ) {
        $query->set( 'orderby', 'title' );
        $query->set( 'order', 'ASC' );
    }
}
add_action( 'pre_get_posts', 'foo_modify_query_order' );

Share this post


Link to post
Share on other sites
James B

I'd say try it to see if works. Unfortunately those type of customizations are outside of our immediate support spectrum so it would be trial and error without using a section or plugin available from the store. We'll leave this thread open in case one of the developer team can advise further.


Kindly search the forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

James B

Share this post


Link to post
Share on other sites

×