Chris Sanders
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: meta_query issueI’m almost positive I have accomplished this somewhere…but can’t think of where I did it. Anyway, MikeSchinkle’s post on this page sounds about right:
Forum: Fixing WordPress
In reply to: meta_query issueFor all of those on the forum- what exactly are you trying to return? Describing the situation normally helps…
Forum: Plugins
In reply to: Custom Post QueryThis one was too easy. I changed how things are done a little bit, but the biggest problem was the lack of spaces at the end of lines within the query…dumb mistake.
[Code moderated as per the Forum Rules. Please use the pastebin]
The problem was using the capital N in “news”. Switching to a lower case switched it, thanks BrenFM!
Forum: Plugins
In reply to: [Plugin: Events Calendar Pro] Old Events Not DisplayingUpdate: The newest version of this plugin (1.3) fixed this issue.
Forum: Plugins
In reply to: [Plugin: Events Calendar Pro] Old Events Not DisplayingOne update on this question:
When I check the box for “Debug Events display issues” it eliminates the “Page not found” error for old events. Checking the box again brings back the original issue.
Forum: Plugins
In reply to: Make a new database connectionJust to help get closer to an answer…
Are you still going to need the $wpdb connection or are you just adding a second database connection?
Also, could you post the actual database calls so we see how you are performing the query by calling the db?
Forum: Plugins
In reply to: Change in Facebook Like ButtonHave you read through the “other site” that you linked us to?
If you don’t wish to actually create the plugin you could always download it from the official plugin page at:
http://wordpress.org/extend/plugins/like/
Once you have it downloaded follow the instructions here:
Forum: Fixing WordPress
In reply to: Select change using AJAXAjax Code:
Forum: Fixing WordPress
In reply to: Select change using AJAXGot it!
Thanks to fgjordan for the assistance. Final code:
php/ajax:
[Large code excerpt removed by moderator per forum rules. Please use the pastebin for all large code excerpts. It works better anyway.]
html:
<select name ="parentSelect" onChange=populate_Select(this.options[this.selectedIndex].value)> <?php // For each key of the array assign variable name "topID" // For each value of the array assign variable name "topName". foreach($array1 as $element) { $topID = $element->CustomH_Id; $topName = $element->CustomH_Name; echo "<option value='".$topID."'>".$topName; ?> <?php } //echo close selector echo "</select>"; // Secondary Element Label echo '<label for="hCustomFields_secondary_element">' . __("Secondary Element: ", 'hCustomFields_textdomain' ) . '</label> '; // create selector that will be populated by AJAX echo "<select id='secondarySelect' name='secondarySelect' disabled='true'>"; // close selector echo "</select>";Forum: Fixing WordPress
In reply to: Select change using AJAXAJAX (with variable += 10 line removed)
[Large code excerpt removed by moderator per forum rules. Please use the pastebin for all large code excerpts. It works better anyway.]
html code:
<select name ="parentSelect" onChange=populate_Select(this.options[this.selectedIndex].value)> <?php // For each key of the array assign variable name "topID" // For each value of the array assign variable name "topName". foreach($array1 as $element) { $topID = $element->CustomH_Id; $topName = $element->CustomH_Name; echo "<option value='".$topID."'>".$topName; ?> <?php } //echo close selector echo "</select>"; // Secondary Element Label echo '<label for="hCustomFields_secondary_element">' . __("Secondary Element: ", 'hCustomFields_textdomain' ) . '</label> '; // create selector that will be populated by AJAX echo "<select id='secondarySelect' name='secondarySelect' disabled='disabled'>"; // close selector echo "</select>";Forum: Fixing WordPress
In reply to: Select change using AJAXHere is the AJAX Code:
[Large code excerpt removed by moderator per forum rules. Please use the pastebin for all large code excerpts. It works better anyway.]
Here is the html code:
<select name ="parentSelect" onChange=populate_Select(this.options[this.selectedIndex].value)> <?php // For each key of the array assign variable name "topID" // For each value of the array assign variable name "topName". foreach($array1 as $element) { $topID = $element->CustomH_Id; $topName = $element->CustomH_Name; echo "<option value='".$topID."'>".$topName; ?> <?php } //echo close selector echo "</select>"; // Secondary Element Label echo '<label for="hCustomFields_secondary_element">' . __("Secondary Element: ", 'hCustomFields_textdomain' ) . '</label> '; // create selector that will be populated by AJAX echo "<select id='secondarySelect' name='secondarySelect' disabled='disabled'>"; // close selector echo "</select>";Forum: Fixing WordPress
In reply to: Select change using AJAXThe page still won’t load unless I comment out the below code:
$(function(){ $('#main_cat').change(function(){ var $parentID=$('#parent_Select').val(); //Empty secondary categories $('#secondary_Select').empty(); //Call ajax $.ajax({ url:"/wp-admin/admin-ajax.php", type:'POST', data:'action=my_special_action&selectedParentID=' + $parentID, success:function(results) { //alert(results); $('#secondary_Select').removeAttr("disabled"); $('#secondary_Select').append(results); } }); }); });