Get Admin Email Address From External PHP page

Basically what you’re looking to do is create a separate page within a WordPress site that (I’m sort of guessing here) you’re not creating within WordPress itself, but you want to pull WordPress data. There’s a “cheater” method and an officially sanctioned method to do what you want. The “cheater” method is to call wp-load.php … Read more

Creating a form contact page?

Probably the theme is using a page template. When you create a Contact page, on the right side, look for “Template” and select the Contact page template from the drop down menu.

wordpress not displaying my form

This is correct behaviour. A simple echo will just return the field from the DB, unmodified. if you want to render the shortcode try <div class=”first”><?php $recentProjects = get_post(‘275’); echo do_shortcode($recentProjects->post_content); ?> </div>

Creating a custom multilingual form

What would be the easiest, cheapest approach for this? Simple, create one form per language. In functions.php or, preferably, as a custom plugin: add_shortcode( ‘my-lingo-form’, ‘shortcode_wpse_98360’); function shortcode_wpse_98360() { $lingo = your_language_detection_method(); switch( $lingo ) { case ‘en’: echo do_shortcode(‘[form-en]’); break; default: echo do_shortcode(‘[form-other-languages]’); break; } } In your post or page: [my-lingo-form].

Using AJAX with Forms

Your add_action() calls for the AJAX handlers are too late. Add these hooks earlier, the best action is probably wp_loaded: add_action( ‘wp_loaded’, ‘register_ajax_handlers’ ); function register_ajax_handlers() { add_action( ‘wp_ajax_jp_ajax_request’, ‘jp_ajax_process’); add_action( ‘wp_ajax_nopriv_jp_ajax_request’, ‘jp_ajax_process’); } See also: Debug AJAX. This code should be placed in a plugin or in your theme’s functions.php.

How to load javascript file on homepage in WordPress in order?

In your functions.php: edit: First register the quicktags script under a different name than already registered in wp “quicktags” , see Codex function quicktags_script() { wp_register_script( ‘quicktags-min’, ‘/wp-includes/js/quicktags.min.js?ver=3.5.1’,”,”,true); wp_enqueue_script( ‘quicktags-min’ ); } add_action( ‘wp_enqueue_scripts’, ‘quicktags_script’ ); This will load the script for all the pages on your front-end. To load it only on front-page : … Read more

limit characters when posting from form

To limit characters add this to your textarea: maxlength=”200″ changing “200” to whatever you want the character limit to be. <textarea id=”description” maxlength=”200″ tabindex=”3″ name=”description2″ cols=”50″ rows=”6″></textarea> For a character counter you will need some basic Javascript, something like this: counter = function() { var value = $(‘#description’).val(); if (value.length == 0) { $(‘#totalChars’).html(0); return; … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)