w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
jQuery onblur event fires on load instead of on blur when using ajax in wordpress front end
I don't know what are your requirements but I assume this ajax call shouldn't happen even when the field is empty so just try put an condition if(jQuery("#jw_email").val() != ''){ jQuery(this).on("blur", function(){ var jw_email = $(this).val(); jQuery.post( // see tip #1 for how we declare global javascript variables MyAjax.ajaxurl, { // here we declare the parameters to send along with the request // this means the following action hooks will be fired: // wp_ajax_nopriv_myajax-submit and wp_ajax_myajax-submit action : 'rcv-checkuser', // other parameters can be added along with "action" jw_email : jw_email, postCommentNonce : MyAjax.postCommentNonce }, func

Categories : Wordpress

Wordpress Plug-in vs. CustomPage
You won't need a plugin for this. You can either a) modify their template (for example page.php) or create your own (page-custom.php). This will help you: http://codex.wordpress.org/Template_Hierarchy.

Categories : Wordpress

Plug in for turn.js in wordpress
First you have to create a template file not js file. then you can create new page and assign this template to that page.Also you have to upload all necessary js and css file to the your WordPress blog.

Categories : Javascript

Wordpress - showing my drafts on the front end
Get the user ID: $current_user = wp_get_current_user(); Then use this as a parameter within your query search: $my_query = new WP_Query("post_status=draft&showposts=10&author=".$current_user->ID);

Categories : Wordpress

How can i add admin profile at front end in wordpress
please visit below every information there you can create it simply with this plugin http://dulabs.com/frontend-edit-profile-for-wordpress/ or http://www.cozmoslabs.com/1341-wordpress-profile-builder-a-front-end-user-registration-login-and-edit-profile-plugin/

Categories : Wordpress

In WordPress, how do I add a folder name in front of a slug?
That sounds like a bug in the theme. My first guess is that there's a naming collision. I believe "category" is the slug Wordpress uses for displaying post categories, while the theme is trying to use "category" to rewrite page permalinks. As an experiment, try editing Wordpress' built-in Category base option. Try going to Dashboard > Settings > Permalinks, and at the bottom under "Category base" set the field to something besides "category", like "mycats" or whatever. For fun try setting it to "category" explicitly and see what happens.

Categories : PHP

Wordpress front page issue
This looks like an issue related to your cache not being cleared. Try clearing your browser cache by pressing F5, if that doesn't fix it the follow below. Do you have any caching plugins on Wordpress (you may also have a server cache)? For example WP Super Cache or W3 Total Cache (there are many more caching plugins)? If you do then you will have to clear the cache.

Categories : Wordpress

Wordpress : display ACF checkbox label on front end
try this: http://www.advancedcustomfields.com/resources/functions/get_field_object/ You can return all the field's metadata with get_field_object().

Categories : Wordpress

Redirect to front page wordpress if not logged in
I tried with the action hook init but the current post/page information is not available yet. But then, template_redirect does the job and it only acts on the front-end, login and admin pages work normally. Here, there's a page with the slug welcome, to check for a post use is_single('post-slug'): add_action( 'template_redirect', 'redirect_so_18688269' ); function redirect_so_18688269() { if( !is_user_logged_in() && !is_page( 'welcome' ) ) { wp_redirect( site_url( 'welcome' ) ); exit(); } }

Categories : PHP

Wordpress, turn wp_tag_cloud into a front-end filter
I haven'f found a solution for this, but instead I found a premium plugin that does exactly this. http://wordpress.org/plugins/query-multiple-taxonomies/

Categories : Wordpress

Wordpress logo only working on front page nothing else
The link to the logo is broken on the the other pages except for the homepage. If you use the inspect element window on Safari you will see that the link is broken on the other pages. It's definitely not a permissions problem. The link to the picture on the homepage is http://utahtraveldirectory.com/wp-content/uploads/yootheme/utah-travel-logo.png but the link on the other pages to the logo is http://utahtraveldirectory.com/hotel-search/wp-content/uploads/yootheme/utah-travel-logo.png. The first link is where the picture actually is.

Categories : Wordpress

Show Registration form in front end wordpress
Here is an (old) article about customizing your registration / login form: http://digwp.com/2010/12/login-register-password-code/

Categories : PHP

wordpress front end multi upload that does same as in back end
user insert_attachment of wordpress to save attachment, then you will also have the functionality to get the images with different styles, get_attachment(id, 'full/medium/thumbnail'). $files = $_FILES['upload_attachment']; foreach ($_FILES as $file => $array) { $newupload = insert_attachment($file,null); // save the $newupload with you from data, as psot id for the attachment } function insert_attachment($file_handler,$post_id,$setthumb='false') { // check to make sure its a successful upload if ($_FILES[$file_handler]['error'] !== UPLOAD_ERR_OK) __return_false(); require_once(ABSPATH . "wp-admin" . '/includes/image.php'); require_once(ABSPATH . "wp-admin" . '/includes/file.php'); require_once(ABSPATH . "wp-

Categories : Wordpress

Trying to separate my back-end codes in my front-end(Wordpress)
This should answer that: http://codex.wordpress.org/Function_Reference/get_template_part Load a template part into a template (other than header, sidebar, footer). Makes it easy for a theme to reuse sections of code and an easy way for child themes to replace sections of their parent theme. Includes the named template part for a theme or if a name is specified then a specialized part will be included. If the theme contains no {slug}.php file then no template will be included. For the parameter, if the file is called "{slug}-{name}.php".

Categories : HTML

Wordpress theme with front page and index at the same time?
In your WP admin panel, under Settings -> Read, you can specify "home page" and "posts page" (by picking them from a dropdown of the pages on your site). Whatever you specify as "home page" will take the front-page.php template (if it exists, otherwise it will revert to the default page.php template), and whatever you specify as the 'posts' page will be considered the 'posts feed' you would normally expect on the homepage and will use the index.php template if no home.php template exists. The template hierarchy is flexible enough you can manage this stuff basically in whatever way you want - see the codex for details http://codex.wordpress.org/Template_Hierarchy

Categories : Wordpress

Redirect Wordpress User to their own Post on Front-End Login
I ended up using a template redirect to make this work. I assume there's technically a better way to do it, but it's loading extremely fast and doing exactly what I need it to. So, now, when a user logs in it goes to a direct url- /profiles - and the template on that page is just a redirect. I used the ideas and some sample code from this smashing magazine post on random redirects to make it work. Here's the function I used in my functions.php file for the template to make the redirect happen: function profile_redirect() { // This is a template redirect // Whenever someone goes to /profile (or any page using the profile template) // this function gets run if ( is_user_logged_in() ) { global $current_user, $post; $args = array( 'author' => $current_user->ID,

Categories : PHP

wordpress is_front_page() is not working (static front page)
You're calling is_front_page() in your functions.php which is the wrong way. You'll find answers here : http://wordpress.stackexchange.com/questions/41805/is-front-page-only-works-in-theme-file-and-does-not-work-in-functions-php

Categories : PHP

How does Wordpress route index.php when a front-page.php is present in the theme?
index.php is the main file for the theme. It contains the code for the Main Area (below header & above footer) and will specify where the other files will be included. Your site may be loading front-page.php because you may have set static page in your settings to be shown as home page. Acording to wordpress official doc: index.php The main template. If your Theme provides its own templates, index.php must be present. front-page.php The front page template, it is only used if you use a static front page. home.php The home page template, which is the front page by default. If you use a static front page this is the template for the page with the latest posts. See this Link for more details on wordpress template hierarchy: WordPress Codex « Theme Development « Template File L

Categories : Wordpress

Can Eclipse IDE plug-ins extend other plug-ins
Is it possible to extend an eclipse plugin Yes. They are called Extension Points. However, the plugin being extended is what defines the extension points for pluggable functionality. You could also just simply make the WST plugin a dependency of your plugin.

Categories : Java

Installing AJDT I got a Plug-in org.eclipse.jdt.ui was unable to load class org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor
I've got the same error after upgrading to Win 8.1. In my case the %workspace%/.metadata/.plugins directory was suddenly write-protected. To remove the lock I had to rename the directory, create a new directory name .plugins and finally the contents from the renamed to the new directory.

Categories : Eclipse

Debuging CRM 2011 plugin with Plugin Profiler shows exception message "Download the details and load with Plug-in Profiler"
This will happen if you are still profiling your plugin while running the debug trace. In the Plugin Registration Tool, make sure you click stop profiling before you click debug to rerun your profiled trace.

Categories : C#

Unable to load css in wordpress 3.6
DO NOT loop through posts to load CSS and JS, yet alone all posts. This code will crash sites. With out seeing the rest of the code, it looks like your enqueing wrong also. In your wp-config.php turn on WP_DEBUG define('WP_DEBUG', true);

Categories : Wordpress

How to Load Ajax in Wordpress
Firstly, you should read this page thoroughly http://codex.wordpress.org/AJAX_in_Plugins Secondly, ajax_script is not defined so you should change to: url: ajaxurl. I don't see your function1() in the above code but you might already define it in other file. And finally, learn how to debug ajax call using Firebug, network and console tab will be your friends. On the PHP side, print_r() or var_dump() will be your friends.

Categories : PHP

Unable to load any JS files in WordPress
I found the solution after some research: function theme_js() { wp_deregister_script('jquery'); wp_register_script('jquery', get_template_directory_uri() . '/js/jquery.js', false, '1.10.2', true); wp_enqueue_script('jquery'); wp_enqueue_script( 'bxslider' , get_template_directory_uri() . '/js/jquery.bxslider.min.js', array('jquery'), '', true ); wp_enqueue_script( 'skrollr' , get_template_directory_uri() . '/js/skrollr.js', array('jquery'), '', true ); wp_enqueue_script( 'general' , get_template_directory_uri() . '/js/general.js', array('jquery'), '', true ); }; add_action('wp_enqueue_scripts', 'theme_js');

Categories : PHP

Load .js file from wordpress plugin
You can do like this using admin ajax : I will not explain the functions . you can google it and learn . Step 1: Localize some values for your script to be used in your javascript files, get admin-ajax.php url $author_nonce = wp_create_nonce( 'nk_author' ); wp_localize_script( 'nk_script', 'nk_object',array( 'nk_ajax_url' => admin_url( 'admin-ajax.php' ) , 'nk_plugin_url' => plugins_url() ,'nk_author' => $author_nonce) ); step 2 : In your script you can do this . var data = { action: 'nk_action', // the function that will be called in your plugin _ajax_nonce : nk_object.nk_author, // nonce for security id : 'mydata' //your data to be sent }; //(admin ajax url , your data , callback for response ) jQuery.post(nk_

Categories : Javascript

Twitter embed (with wordpress) and load?
WordPress uses oEmbed to include twitter among others. You can find the code that does this at wp-includes/class-oembed.php To influence it use: function so_17151843_embed ( $provider, $url, $args ) { // check $provider if it is twitter // change url values to what you want $url = add_query_arg( 'maxheight', $url ) return $url; } add_filter( 'oembed_fetch_url', 'so_17151843_embed' ); You can place this in you funtions.php. This should help you on your way.

Categories : Javascript

Load images based on URL in Wordpress
Assuming you're just wanting to generate an img tag for each file in one of your template directories this should do the trick: <?php $url=$_SERVER[‘REQUEST_URI’]; $url_parts = explode('/',$url); end($url_parts); $dir = current($url_parts)=='' ? prev($url_parts) : current($url_parts); $dir = {get_template_directory_uri()} . '/' . $dir; if (is_dir($dir)) { foreach(scandir($dir) as $file) { if(! is_dir($dir . '/' . $file)) { echo '<img src=' . $dir . '/' . $file ' />'; } } } ?> Note that there's no handling in here whatsoever, so if your url is not a directory then you get nothing, and if your directory has files in it that are not images then you will get broken image tags.

Categories : PHP

Does wordpress load jquery by default?
One more step before wp_enqueue_script to the .php file you need to register the .js (JQuery) file using wp_register_script() the source path constant location.

Categories : Jquery

Load from database into WordPress page
In Wordpress you don't have to do raw SQL queries like you are doing here. There are several ways to get posts that are much more secure. You should try using get_posts or WP_Query and pass exactly the arguments you need to get your posts. This will also return the posts as an object which you can run setup_postdata on and use the Wordpress magic functions like the_title() and the_content(). Using this method, you should be able to target the exact posts you need. Just compare them to the arguments in the Codex that pertain to your specific case. Note, you can also do meta queries and joins just like you can in raw SQL.

Categories : PHP

WordPress 3.6 MediaElement.js styles take time to load
I am unable to reproduce your issue (see it now, really quick for me in chrome only). Have you tried forcing the scripts / css to load in advance of the page? I have done similar to this with a different problem (likely same root cause). Also had to cache the CSS to make it work: http://www.phpied.com/the-art-and-craft-of-postload-preloads/ I got this from a SO thread but only bookmarked the blog post - found it: Force browsers load CSS before showing the page

Categories : Wordpress

Tooltipster jQuery load issue in Wordpress
by the looks of it - it seems that jquery is in noconflict mode. update your code by adding jQuery instead of $ <script> jQuery(document).ready(function() { jQuery('.tooltip').tooltipster(); }); </script>

Categories : Jquery

Load a different stylesheet in WordPress if an admin is logged in
I never used WP but if you can edit the code you could do a simple query if the admin is logged in and then use some inline-code <div class="example" <?php if($admin == 1){ echo 'style="display: block;"';} else{ echo 'style="display: none;"'; ?>> CONTENT </div>

Categories : PHP

Why won't wordpress load the javascript file on a different server?
I think you're facing a problem of same origin policy. It happens to me more than once using Ajax and you only realize this once you push your code on non-local servers. You can read more on the subject here. Hope this will help solve your problem.

Categories : Javascript

How to register/load a style css file in a wordpress sub theme?
That's because wp_print_styles() is never called (either directly or via an action) on the login page. If you check out the source of login_header(), you'll see the core stylesheets are rendered like so: wp_admin_css( 'wp-admin', true ); wp_admin_css( 'colors-fresh', true ); So instead of wp_enqueue_style( 'olab-login' ), use wp_print_styles( 'olab-login' ), which will output the stylesheet immediately. And purely for semantics, I would also suggest using the login_head action instead, (the two are called one after the other, so there's no real difference). function olab_login_stylesheet() { wp_register_style( 'olab-login', get_template_directory_uri() . '/css/login-style.css' ); wp_print_styles( 'olab-login' ); } add_action( 'login_head', 'olab_login_stylesheet' );

Categories : PHP

Can't load phpBB installed in a subfolder inside wordpress
I had this same problem, and with much trial and error: I figured out that in order to complete the installation, I need to visit the domain.com/forumfolder/phpBB3 NOT with a lowercase phpbb3 but as it is on the file with upper case BB: "domain.com/forumfolder/phpBB3". Hope this helps!

Categories : Wordpress

How to load only specific objects from DB in wordpress by using meta_query with NOT LIKE compare?
meta_query works on fields in the wp_postmeta table; post title is stored in the wp_posts table, so meta_query won't help you here. Take a look at this question on the WordPress stackexchange; the answers seem to do what you're after by using the posts_where filter.

Categories : Wordpress

Is wordpress supposed to automatically load images over https?
Wordpress has a plugin that does this trick. Wordpress HTTPS(SSL) It replaced all images loaded through "HTTP" with "HTTPS".

Categories : Image

Wordpress : To load all asset files coming from HTTP to HTTPS?
You could try using a protocol relative URL (dropping both the http and https from the URLs) - see this answer. According to this answer you'll need to be on a recent version of WordPress (I'd assume 3.5) for it to work with wp_enqueue_script.

Categories : Wordpress

Wordpress: Simple solution to have mobile devices load a different homepage
I think that this is as simple as it could get: Try this plugin - UserAgent Theme Switcher It will use the user-agent to detect which browser you are on, in this case it could be something like mobile safari or android, etc... then serve the theme based on that. This could be a hit or miss because you might want or not to change the theme. A more advanced way to do this would be to use a jQuery plugin that checks for the user agent and lets you "do stuff" after you detect it, in this case it could serve as another page or change some CSS.

Categories : Wordpress

Load jQuery from Google AJAX Libraries API in Wordpress with "fallback script"
You can try this: <script> try { //First check if jQuery exists.. var test = jQuery.trim("test"); } catch(e) { //If it doesn't, add it manually.. var script = document.createElement("SCRIPT"); script.setAttribute("src", "js/vendor/jquery-1.9.1.min.js"); document.head.appendChild(script); } </script>

Categories : PHP



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.