PLOption not being applied when chosen from within page
Started by
mhcalumnae
, Oct 03 2012 02:58 PM
ploption custom section
8 replies to this topic
#1
Posted 03 October 2012 - 02:58 PM
I have created a custom section, which uses wp_query to pull out posts of a particular category only. The section is intended to be used on custom page templates. I have created an option for this, so that the user can choose the category of posts that should be displayed. The option is a simple dropdown containing the list of categories.
When I select a category from site wide options, it all works fine - only the posts in the chosen category are displayed. But when I select a category from the page options, it isn't applied. Here is my code:
Setting up the option in my section .php file:
Pulling out the option:
I had a look at the developer docs but the options section doesn't seem to be populated. Any help on how I can apply the option when selected from the page would be much appreciated.
Many Thanks,
John
When I select a category from site wide options, it all works fine - only the posts in the chosen category are displayed. But when I select a category from the page options, it isn't applied. Here is my code:
Setting up the option in my section .php file:
Pulling out the option:
I had a look at the developer docs but the options section doesn't seem to be populated. Any help on how I can apply the option when selected from the page would be much appreciated.
Many Thanks,
John
#2
Posted 03 October 2012 - 10:03 PM
Can you paste the full code here?
#3
Posted 03 October 2012 - 11:10 PM
Hi Rob,
Thanks for getting back to me. I've pasted the following:
section.php
AAMHCPostsCategory (a supporting class, which extends pagelinesposts)
functions.php
Let me know if you need anything else.
Thanks for getting back to me. I've pasted the following:
section.php
AAMHCPostsCategory (a supporting class, which extends pagelinesposts)
functions.php
Let me know if you need anything else.
#4
Posted 04 October 2012 - 10:19 PM
Well, we need the links to what you posted. There are tens of thousands of postings in the pastebin.
Sorry, I should have explained that.
Sorry, I should have explained that.
#5
Posted 05 October 2012 - 12:34 PM
Sorry about that, here are the links:
#6
Posted 08 October 2012 - 07:42 PM
I have sussed this one out. I replaced $this->oset with an array and populated the items individually. Here is the old code:
I replaced it with the following:
I replaced it with the following:
#7
Posted 09 October 2012 - 12:11 AM
Is this resolved? I couldn't tell from your last comments.
#8
Posted 09 October 2012 - 01:17 PM
Yes, it's working now. Thanks.
#9
Posted 10 October 2012 - 01:04 AM
The topic was marked as resolved.
Also tagged with one or more of these keywords: Resolved, ploption, custom section
Resolved
PageLines Framework →
Technical Support →
Anything Boxes And Polylang Language Filtering ProblemStarted by janpeeters , 01 Dec 2012 |
|
|
||
Header In Banner AlignmentStarted by bankrollbuilder , 28 Nov 2012 |
|
|
||
Resolved
PageLines Framework →
Customizations →
2 Hero UnitsStarted by starlit , 28 Nov 2012 |
|
|
||
Tabs Do Not Align HorizontallyStarted by hutruk , 28 Nov 2012 |
|
|
||
Resolved
PageLines Framework →
Customizations →
Reduce Margin In Contact FormStarted by texasx , 27 Nov 2012 |
|
|










