vidhumohan
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: How to create pages with different themesAdding the following comment` creates a template naming Full Width page
<?php /** * Template Name: Full Width Page */?>For listing the templates created to the user refer the following code
<?php $templates = wp_get_theme()->get_page_templates(); foreach ( $templates as $template_name => $template_filename ) { echo "$template_name ($template_filename)<br />"; } ?>For setting the template after the user selecting one use the following
update_post_meta( $page_id, '_wp_page_template', $template_filename );Forum: Fixing WordPress
In reply to: Adding pagination to query string?Forum: Plugins
In reply to: [ACF qTranslate] ACF Flexible Content & qTranslate X not workingHi,
I also have the same issue.
I tried with qtranslate wysisyg editor also, then its not saving, the fields gone blank after saving.Please help.
Forum: Fixing WordPress
In reply to: Help with ordering custom taxonomyHi,
You can do it by Dynamically switch template on click. refer,
http://wordpress.stackexchange.com/questions/115004/dynamically-switch-template-on-clickor by setting cookie,
https://ww.wp.xz.cn/support/topic/how-do-i-sort-posts-by-a-custom-field-dynamically-pluginHi,
The file front/social_login/linkedin.js is using for this.
Deregister(the_champ_sl_linkedin) it from your functions.php.
Enqueue new js, where you could specify the fields.
Example:IN.Event.on(IN,'auth',function(){theChampLoadingIcon();IN.API.Profile("me").fields(["email-address","id","first-name","last-name","location","headline","picture-url","public-profile-url"]).result(function(result){if(result.values[0].id&&result.values[0].id!=''){theChampCallAjax(function(){theChampAjaxUserAuth(result.values[0],'linkedin')})}})}); function theChampLinkedInOnLoad(){theChampDisplayLoginIcon(document,'theChampLinkedinButton')}Forum: Fixing WordPress
In reply to: wp-admin page is white and blankHi,
Change to a default theme and also deactivate all the plugins. It may work.
Forum: Plugins
In reply to: [mqTranslate] Add mqTranslate Tabs to Custom wp_editorHi
try this plugin
https://ww.wp.xz.cn/plugins/qtranslate-x/Forum: Fixing WordPress
In reply to: copy the site to another serverThe issue may be with the site url, refer the following link and choose the most convinient one.
Forum: Plugins
In reply to: [Math Captcha] Form Submit even after the invalid value enteredThe issue was with the $cf7_version = get_option(‘wpcf7’, ‘1.0.0’); in the file wp-content/plugins/wp-math-captcha/includes/integration-cf7.php
To solve the issue add “$cf7_version = $cf7_version[‘version’];” below ” $cf7_version = get_option(‘wpcf7’, ‘1.0.0’);”
or add the following code in your functions.php
add_filter('wpcf7_validate_mathcaptcha', 'my_mathcaptcha_validation_filter', 10, 2); function my_mathcaptcha_validation_filter($result, $tag) { $tag = new WPCF7_Shortcode($tag); $name = $tag->name; if(!is_admin() && isset($_POST[$name])) { $cf7_version = get_option('wpcf7', '1.0.0'); $cf7_version = $cf7_version['version']; if($_POST[$name] !== '') { $session_id = (isset($_POST[$name.'-sn']) && $_POST[$name.'-sn'] !== '' ? Math_Captcha()->cookie_session->session_ids['multi'][$_POST[$name.'-sn']] : ''); if($session_id !== '' && get_transient('cf7_'.$session_id) !== false) { if(strcmp(get_transient('cf7_'.$session_id), sha1(AUTH_KEY.$_POST[$name].$session_id, false)) !== 0) { if(version_compare($cf7_version, '4.1.0', '>=')) $result['reason'][$name] = wpcf7_get_message('wrong_mathcaptcha'); else { $result['valid'] = false; $result->invalidate($tag, wpcf7_get_message('wrong_mathcaptcha')); } } } else { if(version_compare($cf7_version, '4.1.0', '>=')) $result->invalidate($tag, wpcf7_get_message('time_mathcaptcha')); else { $result['valid'] = false; $result['reason'][$name] = wpcf7_get_message('time_mathcaptcha'); } } } else { if(version_compare($cf7_version, '4.1.0', '>=')) $result->invalidate($tag, wpcf7_get_message('fill_mathcaptcha')); else { $result['valid'] = false; $result['reason'][$name] = wpcf7_get_message('fill_mathcaptcha'); $result->invalidate($tag, wpcf7_get_message('fill_mathcaptcha')); } } } return $result; }Forum: Plugins
In reply to: [Math Captcha] When Captcha is not filled out the form still can go throughThe issue was with the $cf7_version = get_option(‘wpcf7’, ‘1.0.0’); in the file wp-content/plugins/wp-math-captcha/includes/integration-cf7.php
To solve the issue add “$cf7_version = $cf7_version[‘version’];” below ” $cf7_version = get_option(‘wpcf7’, ‘1.0.0’);”
or add the following code in your functions.php
add_filter('wpcf7_validate_mathcaptcha', 'my_mathcaptcha_validation_filter', 10, 2); function my_mathcaptcha_validation_filter($result, $tag) { $tag = new WPCF7_Shortcode($tag); $name = $tag->name; if(!is_admin() && isset($_POST[$name])) { $cf7_version = get_option('wpcf7', '1.0.0'); $cf7_version = $cf7_version['version']; if($_POST[$name] !== '') { $session_id = (isset($_POST[$name.'-sn']) && $_POST[$name.'-sn'] !== '' ? Math_Captcha()->cookie_session->session_ids['multi'][$_POST[$name.'-sn']] : ''); if($session_id !== '' && get_transient('cf7_'.$session_id) !== false) { if(strcmp(get_transient('cf7_'.$session_id), sha1(AUTH_KEY.$_POST[$name].$session_id, false)) !== 0) { if(version_compare($cf7_version, '4.1.0', '>=')) $result['reason'][$name] = wpcf7_get_message('wrong_mathcaptcha'); else { $result['valid'] = false; $result->invalidate($tag, wpcf7_get_message('wrong_mathcaptcha')); } } } else { if(version_compare($cf7_version, '4.1.0', '>=')) $result->invalidate($tag, wpcf7_get_message('time_mathcaptcha')); else { $result['valid'] = false; $result['reason'][$name] = wpcf7_get_message('time_mathcaptcha'); } } } else { if(version_compare($cf7_version, '4.1.0', '>=')) $result->invalidate($tag, wpcf7_get_message('fill_mathcaptcha')); else { $result['valid'] = false; $result['reason'][$name] = wpcf7_get_message('fill_mathcaptcha'); $result->invalidate($tag, wpcf7_get_message('fill_mathcaptcha')); } } } return $result; }Forum: Fixing WordPress
In reply to: Changed Permalink and Pages Not Working (404 Error)Hi,
Check your .htaccess file, http://codex.ww.wp.xz.cn/htaccess
Forum: Hacks
In reply to: Problem with 'save_post' hook not runningDid you tried the plugin advanced custom field, https://ww.wp.xz.cn/plugins/advanced-custom-fields/
Forum: Hacks
In reply to: Problem with 'save_post' hook not runningHi,
Try the function with action hooks publish_post and edit_post.Forum: Fixing WordPress
In reply to: Change the pictures to smaller imagesForum: Fixing WordPress
In reply to: Moved hosting to One.com – database connection brokenHi,
Change siteurl and baseurl in wp-options table. Also change the urls in your posts, refer http://gerardmcgarry.com/2010/wordpress-how-to-use-mysql-to-replace-the-url-in-your-posts/