samedi 2 avril 2016

Form validation error in wordpress

am using wordpress with cardinal theme and am submit the contact form and i got the following errors.

Fatal error: Call to a member function set_rules() on a non-object in \wp-content\plugins\theme_support_cardinal\includes\helpers\forms.php on line 342

i don't know how to fix this isse??.

Thanks.



via Chebli Mohamed

Admin calendar of wordpress plugin -Appointment calendar is not working

I am using Appointment calendar in my website. It was functioning properly but now the admin calendar is not working. Front end is working as usual.



via Chebli Mohamed

vendredi 1 avril 2016

how to put Wordpress website online

hi my laptop stopped working so i erased everything but i always take backups i have my WordPress file now i don"t really know how to create table again in mamp when i am trying to access my website on mamp it shows me We were able to connect to the database server (which means your username and password is okay) but not able to select the Dennisleather database. can anyone please help thanks in advance.

   /** The name of the database for WordPress */
  define('DB_NAME', 'Dennisleather');

 /** MySQL database username */
 define('DB_USER', 'root');

 /** MySQL database password */
 define('DB_PASSWORD', 'root');

 /** MySQL hostname */
 define('DB_HOST', 'localhost');

 /** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8mb4');

/** The Database Collate type. Don't change this if in doubt. */
 define('DB_COLLATE', '');

define( 'WP_AUTO_UPDATE_CORE', false );



via Chebli Mohamed

Wordpress Find User Location

I have a wordpress site and want to display the subscription rate for our software for the year. Im using money.js and accounting.js to convert the rate and display the currency correct and an API to pull the exchange rates.

here is my script

jQuery(document).ready(function() {
    fx.base = "EUR";
    fx.settings = {
        from: "EUR"
    };

    var amount = 432.00;
    jQuery.getJSON(
        'http://ift.tt/1UmIXTI',
        function(data) {
            // Check money.js has finished loading:
            if (typeof fx !== "undefined" && fx.rates) {
                fx.rates = data.rates;
                fx.base = data.base;
            } else {
                // If not, apply to fxSetup global:
                var fxSetup = {
                    rates: data.rates,
                    base: data.base
                }
            }

            // now that we have exchange rates, add a few to our page
            var USD = fx.convert(amount, {
                to: "USD"
            });
            var GBP = fx.convert(amount, {
                to: "GBP"
            });
            var JPY = fx.convert(amount, {
                to: "JPY"
            });
            var EUR = fx.convert(amount, {
                to: "EUR"
            });
            var AUD = fx.convert(amount, {
                to: "AUD"
            });
            var ZAR = fx.convert(amount, {
                to: "ZAR"
            });
            USD = accounting.formatMoney(USD, "$ ", 0);
            GBP = accounting.formatMoney(GBP, "£ ", 0);
            JPY = accounting.formatMoney(JPY, "¥ ", 0);
            EUR = accounting.formatMoney(EUR, "€ ", 0);
            AUD = accounting.formatMoney(AUD, "$ ", 0);
            ZAR = accounting.formatMoney(AUD, "R ", 0);

            jQuery("#UsdPrice").html(USD);
            jQuery("#ZarPrice").html(ZAR);
            jQuery("#AudPrice").html(AUD);
        }
    );

});

I want to display the converted price for South Africa, USA, Australia. Everything else is working, but cant figure out how to get the users location. I have tried this plugin http://ift.tt/1qsjokf but it seems theres problems with the database the plugin uses. Any help welcome



via Chebli Mohamed

Force plugin to use wp_mail

I downloaded a theme that has built a plugin for contacts which should send emails through an SMTP server through another plugin (WP Mail SMTP). the problem is that the contact plugin use own function mail() for sending e-mail and does not use wp_mail .

this means that outbound emails are not sent from wordpress email system, and therefore can not be sent through the SMTP plugin (which bypasses the default wp php email system)

This is the contact form code:

I tried to replace mail with wp_mail, but this did not work

<?php

$contact_message = $_POST['contact_message'];

// Redirect back
Header('Location: '. $_POST['contact-url'].'?message='.$contact_message);
echo "<meta charset='utf-8'>";  

// Loading variables from form
$blog_email = $_POST['blog_email'];
$name = $_POST['contact-name'];
$email = $_POST['contact-email'];
$message = $_POST['contact-message'];

// EMAIL TO HOTEL CREW
$headers = 'From: '. $name . '<' . $email . '>' . "\r\n" .
    'Reply-To: '. $name . '<' . $email . '>' . "\r\n" .
    'X-Mailer: PHP/' . phpversion();
$subject = 'Message';
$message = 'Name: ' . $name . '
Email: ' . $email . '

' . $message;

$to = $blog_email;

// Send mail
mail($to,$subject,$message,$headers);
// END OF EMAIL TO HOTEL CREW
// ---------------------

exit();

?>

could you give me some advice?

Thanks

Regards, Fabio



via Chebli Mohamed

Add wp-editor in admin section in wp-job-manager plugin

How can we add wp-editor in textarea in admin dashboard in wp job manager plugin?

Below code working in front end but in back end it is not working

 add_filter( 'submit_job_form_fields', 'frontend_add_salary_field' );


 function frontend_add_salary_field( $fields ) {
 $fields['job']['job_salary'] = array(
 'label'       => __( 'Salary ($)', 'job_manager' ),
 'type'        => 'wp-editor',
 'required'    => true,
 'placeholder' => 'e.g. 20000',
 'priority'    => 7
 );
 return $fields;
 }

For back end i used

  add_filter(job_manager_job_listing_data_fields','admin_add_salary_field'   );


 function admin_add_salary_field( $fields ) {
 $fields['_job_salary'] = array(
 'label'       => __( 'Salary ($)', 'job_manager' ),
 'type'        => 'wp-editor',
 'placeholder' => 'e.g. 20000',
 'description' => ''
 );
 return $fields;
}

This is not working.



via Chebli Mohamed

Wordpress heavy load / alternatives to it

I am making a website for a client who is basically creating a website which is an archive of information of a certain topic. The amount of "posts" he has is near 500k or so, quite a lot for wordpress. I've tried inserting them all with a script to see if it could handle it and I've found that it was able to handle them.. at least on the frontend. The backend, the admin area, is basically unusable right now. It will crash after any change you attempt to make.

Now, this was done by using just w3 total cache, yoast seo, akismet, and the default theme (which is kinda nice with the pagination job).

My question is, are there any known solutions for heavy data on wordpress without having to modify its core? I've seen a few lightweight alternative to wp out there, but wp features/plugins are a nice thing to have.

Thanks.



via Chebli Mohamed