Plugin Author
finnj
(@finnj)
Hi,
Yes I believe it can be done using templates.
That way you can build your own Category dropdowns based on condition. but it will involve html and php coding
Thread Starter
matuh
(@matuh)
Could I please get a bit more information about using templates?
I have copied frontier_form.php and frontier_list.php to ./wp.content/themes/[your active theme]/plugins/frontier-post/, but how can I use these in a new page?
And another question: how can I change the following code so there would be only those categories in the list that I choose to?
<?php
foreach ( $catlist as $category1) : ?>
<option value="<?php echo $category1['cat_ID']; ?>" <?php if ( $cats_selected && in_array( $category1['cat_ID'], $cats_selected ) ) { echo 'selected="selected"'; }?>><?php echo $category1['cat_name']; ?></option>
<?php endforeach; ?>
Thread Starter
matuh
(@matuh)
Okay, it seems I misunderstood how this is working. So now Frontier post will take the template file automatically from the themes folder. But, how can I add another form? How can this be done with templates?
Plugin Author
finnj
(@finnj)
Hi,
There could be different ways to do this.
If it is only minor things that is is different from form to form (ex. Category drop down) you can use a if or switch statement.
The question is how you determine which category dropdown to display…..
Plugin Author
finnj
(@finnj)
Hi,
There could be different ways to do this.
If it is only minor things that is is different from form to form (ex. Category drop down) you can use a if or switch statement.
Other way is to use include() function based on a if or switch statement
The question is how you determine which category dropdown to display…..
Thread Starter
matuh
(@matuh)
Hi,
Yes, I only want to change the category drop downs. I need three different forms with three different category drop downs.
finnj, if you have some time I would really appreciate if you could help me with the code. I don’t write php myself, I can only read a bit and I’m not able to do this on my own.
Plugin Author
finnj
(@finnj)
I cant promise but I might have time to look at it during the weekend
A link to your site ?
Thread Starter
matuh
(@matuh)
That would be awesome.
My site is here: http://kohalikule.ee/minu-kuulutused/
You can create an account there. It’s not in English, so if you need any clarification ask here.
Plugin Author
finnj
(@finnj)
Try version 2.1.0
I have added a new parameter frontier_parent_cat_id in version 2.1.0 by using that you can have different forms that only will show children of the category id you specify.
[frontier-post frontier_parent_cat_id=7]