htausch
Forum Replies Created
-
Forum: Plugins
In reply to: [Contact Form DB] Pull in data from custom DBOk, so reading your documentation and comments further I solved it.
I followed Step One from here.
And then I added the code mentioned here.
Meaning I added this to my function in my functions.php file:
function ft_calculator() { require_once(ABSPATH . 'wp-content/plugins/contact-form-7-to-database-extension/CFDBShortCodeSavePostData.php'); $handler = new CFDBShortCodeSavePostData; $handler->handleShortcode(null); }
Forum: Plugins
In reply to: [Contact Form DB] Pull in data from custom DBAlso, I should note that I can’t figure out how to add your
[cfdb-save-form-post]
to the post url because I am using AJAX to dynamically post (at least I believe, I didn’t write this code and have very little experience with AJAX).function Calculate_Ft() { var FormData=jQuery('#frmcalculator').serialize(); jQuery('#calresult').hide(); jQuery.ajax({ type : 'POST', url : myAjax.ajaxurl, data : FormData+"&action=ft_calculator", dataType : "json", async :false, success :function(data){ jQuery('#calresult').show(); jQuery('#calresult').html(data.result); } }); }
And then in the template file we have:
<form name="frmcalculator" id="frmcalculator" role="form"> <label>Some Inputs Here</label> <input type="text" name="email" id="email" /> <button type="button" onclick="Calculate_Ft();">CALCULATE</button> <div class="results"> <div id="calresult"> </div> </div> </form>
The
ft_calculator()
function is defined in the functions file. That is where it is telling the form what database to store in.Forum: Plugins
In reply to: [Contact Form DB] Pull in data from custom DBI’m sorry, I meant
my_database_name
notmy_form_name
Forum: Fixing WordPress
In reply to: How to count custom post types with conditional operatorsThanks, I figured it out a little later. It was a case of trying to work too late at night.
Forum: Fixing WordPress
In reply to: Limit tag output only in templateI think I got it working. First
$template_name = get_post_meta( $wp_query->post->ID, '_wp_page_template', true );
was not needed. Next, I needed an else statement. I didn’t know how to make an else statement that showed all tags (undid the filter I just added) so I just set the number to a high amount of tags to output.add_filter( "term_links-royal_portfolio_cats", 'limit_terms'); function limit_terms($val) { if ( is_page_template('portfolio.php')) { return array_splice($val, 0, 5); } else { return array_splice($val, 0, 20); } }
I’m still working on how to append the … And if anyone has a better suggestion for my else statement please let me know!
Perfect! That fixed it, thank you!
It shows “23 minutes ago via XXX’s Twitter” the first time. But then doesn’t have that information on the next tweet (at least in FireFox, I haven’t tested other browsers).
My short code is:
[rotatingtweets search="from:SERVICEEDUAuto OR #SERVICEEDU" show_meta_via=0 rotation_type=scrollLeft]
Please checkout my website:
https://service-edu.com/test/It’s only showing the publisher of the tweet the first time.
Great, do you know how to get it to show the screen name info for more than just the first tweet?
Also, is there a reason it’s not pulling in a profile photo?
It works much better (show_meta_screen_name=0 didn’t do what I expected so I removed it) but now it’s only showing who tweeted what the first time.
[rotatingtweets search="from:SERVICEEDUAuto OR #SERVICEEDU" show_meta_via=0 rotation_type=scrollLeft]
Forum: Fixing WordPress
In reply to: Child theme's CSS taking way to long to loadI’m using Dreamweaver but have Notepad++ if need be.
Forum: Fixing WordPress
In reply to: Child theme's CSS taking way to long to loadI’m using Haxon as the parent theme. I know my template is correct because my child theme is working properly. The only issue is the long css load times. I am thinking that loading unchanged styles (parent and then child) is probably my issue. I’m currently trying to figure out how to compare 5k lines of code for differences.
Forum: Plugins
In reply to: [Secure Custom Fields] Sorting by custom field date and post date?Solved it! In functions.php:
function acf_update_date($post_ID) { $datepicker = get_field('event_start_date', $post_ID); if($datepicker) { $date = $datepicker; } else { $date = get_the_time('Ymd', $post_ID); } update_field('event_start_date', $date, $post_ID); } add_action('acf/save_post', 'acf_update_date', 20);
In loop:
$queryArgs = array( 'post_type' => 'portfolio', 'meta_key' => 'event_start_date', 'orderby' => 'meta_value_num', 'order' => 'DESC', );
Forum: Plugins
In reply to: [Wp-Pro-Quiz] Change Cloze to textareaSolved!
I also changed all instances of
.wpProQuiz_cloze input
to.wpProQuiz_cloze textarea
in the \js\wpProQuizFront.js and \js\wpProQuizFront.min.js files.You can also do the css files but I chose not to becuase I wanted to do my own css styling.