w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Bootstrap Submenu links not working
I fixed this issue by adding the following javascript: $('.dropdown-submenu ul.dropdown-menu li a').on('touchstart', function(e) { e.preventDefault(); window.location.href = $(this).attr('href'); })

Categories : Javascript

Dashboard login on wordpress 3.6 redirect loop
I found the solution here The important stuff: In WP directory's .htaccess file ,just below the line containing “RewriteEngine on”, add: # add a trailing slash to /wp-admin RewriteCond %{REQUEST_URI} ^.*/wp-admin$ RewriteRule ^(.+)$ /wp-admin/ [R=301,L]

Categories : Wordpress

Widgets menu not appear under appearance on wordpress dashboard
I used this great tutorial just the other day for making a widget, it works fine and if you follow all of the steps you'll see the widget option appearing in your admin side: http://wp.tutsplus.com/tutorials/creative-coding/building-custom-wordpress-widgets/

Categories : Wordpress

Wordpress - How to allow subscribers to change their password without Dashboard
Function wp_set_password will reset the user's password. You just need to build a form to get the new password from the user then call this function.

Categories : Wordpress

How can I remove css rules apply on dashboard in wordpress?
It's spilling in the admin area because you need to wrap all that in the appropriate hook: add_action( 'wp_enqueue_scripts', 'my_enqueue' ); function my_enqueue() { // Register and enqueue CSS and JS here } See: Action_Reference/wp_enqueue_scripts

Categories : CSS

Remove "Updates" link from Wordpress Admin Dashboard
This should do it: function edit_admin_menus() { global $submenu; unset($submenu['index.php'][10]); return $submenu; } add_action( 'admin_menu', 'edit_admin_menus' ); Put that in your theme's functions.php file or in your plugin code.

Categories : Wordpress

How can change the first submenu name of a menu in wordpress?
change like this add_menu_page("my-plugin", "Main Menu", "publish_posts", "activate_plugin", "wpqs_active_plugin"); add_submenu_page("activate_plugin", "Sub menu", "Activation", "publish_posts", "activate_plugin", "wpqs_active_plugin");

Categories : Wordpress

how to uninstall plugin while wordpress dashboard is not working ? and ftp credential errors
If you have access to the MySQL server that's hosting your WordPress installation data, you can get a list of active plugins with the following query: SELECT * FROM wp_options WHERE option_name = 'active_plugins'; to deactivate all plugins, you can do something along the lines of UPDATE wp_options SET option_value = 'a:0:{}' WHERE option_name = 'active_plugins'; as I recall. If you are only wanting to disable one plugin, you can CAREFULLY edit the text for 'active_plugins' and UPDATE accordingly.

Categories : Wordpress

Wordpress: Change admin submenu order
Found the solution, just need to add this function to your functions.php /*Change menu-order*/ add_filter( 'custom_menu_order', 'wpse_73006_submenu_order' ); function wpse_73006_submenu_order( $menu_ord ) { global $submenu; // Enable the next line to see all menu orders //echo '<pre>'.print_r($submenu,true).'</pre>'; $arr = array(); $arr[] = $submenu['edit.php'][5]; //my original order was 5,10,15,16,17,18 $arr[] = $submenu['edit.php'][10]; $arr[] = $submenu['edit.php'][18]; $arr[] = $submenu['edit.php'][17]; $arr[] = $submenu['edit.php'][15]; $arr[] = $submenu['edit.php'][16]; $submenu['edit.php'] = $arr; return $menu_ord; } Here by choosing edit.php, I'm targeting 'Posts' menu. You can choose any file that you want

Categories : PHP

Adding Google Analytics Dashboard to Custom Post Type [WordPress]
Hello, If you want to program solution by yourself of your team-it is not easy. You should use Google Analytics API for PHP. It is not possible to describe it at small peace of text,but, may be, following links will be helpful for you and your developer: https://developers.google.com/analytics/devguides/reporting/core/v3/coreDevguide http://code.google.com/p/google-api-php-client/downloads/list https://developers.google.com/analytics/solutions/reporting

Categories : PHP

Wordpress to display custom USERMETA field on User Profile Dashboard?
It's ok now as i got it by myself, like this: add_action( 'show_user_profile', 'display_user_custom_hash' ); add_action( 'edit_user_profile', 'display_user_custom_hash' ); function display_user_custom_hash( $user ) { ?> <h3>USERMETA Fields</h3> <table class="form-table"> <tr> <th><label>Custom Hash Key</label></th> <td><input type="text" value="<?php echo get_user_meta( $user->ID, 'user_custom_hash', true ); ?>" class="regular-text" readonly=readonly /></td> </tr> </table> <?php } Add this snippet at the bottom of functions.php file of my current Theme folder. Note:After that entire code-above should be then, just the normal ?> for t

Categories : Wordpress

when I tried to open the dashboard of the wordpress multisite network admin (child theme) I am getting 404 error
there is no .htaccess file in the IIS server, I have a web.config file that is generated by wordpress itself at the time on installation of multisite. web.config generated by wordpress <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <rule name="WordPress Rule 1" stopProcessing="true"> <match url="^index.php$" ignoreCase="false" /> <action type="None" /> </rule> <rule name="WordPress Rule 2" stopProcessing="true"> <match url="^([_0-9a-zA-Z-]+/)?wp-admin$" ignoreCase="false" /> <action type="Redirect" url="{R:1}wp-admin/" redirec

Categories : Wordpress

jQuery show submenu on hover and add class if submenu exists
$('ul.nav > li').hover(function () { if ($(this).find('ul.submenu').length > 0) { $(this).find('ul.submenu').show(); $(this).addClass('arrow-down'); } }, function () { if ($(this).find('ul.submenu').length > 0) { $(this).find('ul.submenu').hide(); $(this).removeClass('arrow-down'); } });

Categories : Javascript

Submenu disappears when I am over video with mouse but still hovering submenu
Video has a nasty habit of going on top of other content depending on the type of player you are using. Did you try z-index on other elements? http://www.w3schools.com/cssref/pr_pos_z-index.asp

Categories : HTML

CSS - Keep submenu visible while hovering over either main or submenu
Try changing your submenu style to: #dropnav ul li ul { margin:0px; padding:0px; display:none; position:relative; left:0px; z-index: 99; top:0px; padding-top: 50px; } Demo Fiddle

Categories : HTML

Joomla not Showing Dropdown SubMenu to SubMenu?
It should work with this configuration, in the back-end go to "extensions" -> "Module manager" -> "the name of the module which linked to the menu"

Categories : PHP

Why such links are valid in Wordpress?
That is because wordpress by default takes the last value as the input parameter after the "topic" keyword. That is why it is returning the same page. For example if you enter http://mysite.com/topics/something/mycat/lkjasdklfj Now that will show you an 404 error.

Categories : Wordpress

Embedding links in WordPress 3.6
Make sure the YouTube link is not hyperlinked. If the URL is shown in your theme’s link color (as the second line in the screenshot below), then it is hyperlinked. Simply select the whole URL and click the “Unlink” icon on your Visual Editor toolbar. Once the URL is unlinked, you will see the link text in black. Make sure to place the YouTube URL or shortcode on its own line. This means there should be no character or whitespace before or after the URL/shortcode. http://en.support.wordpress.com/shortcodes/ However, beyond those issues you might want to look into. the API that WP uses to embed links from YouTube, Twitter, Flicker... http://oembed.com/ oEmbed is a format for allowing an embedded representation of a URL on third party sites. The simple API allows a website to di

Categories : Wordpress

Wordpress links function
Refer: http://codex.wordpress.org/Template_Tags/wp_list_categories#Include_or_Exclude_Categories You can use 'exclude' parameter to exclude categories. Is this what you are looking for ?? Thanks.

Categories : Wordpress

wordpress links keep appending the URL
Based on past experience with Ajax, you may have ajax page loader plugin turned on. Turn that off. If that isn't the case (and I don't think it is - your theme seems to have ajax built in), you would need to go into the theme options or into the code to turn it off. What theme are you using?

Categories : Wordpress

How to change URL links that were made by WordPress?
I believe what you're looking for can be found in the admin panel. In the admin panel (http://www.your-wordpress-site.com/wp-admin), go to Settings > Permalinks

Categories : PHP

add submenu list to css horizontal submenu
just added few things in css .select_sub ul li { position: relative; } .nav .current .sub li:hover ul { display: inline; } .select_sub ul ul { position: absolute; bottom: -28px; left: 0; background: #999; min-width: 140px; text-align: left; display: none; } .select_sub ul ul li { float: none; } here's the updated fiddle http://jsfiddle.net/vamsikrishna981/WnAHk/

Categories : HTML

wordpress pretty links - only homepage works
Well the file itself may be fine, but does your provider allows you to use .htaccess file by default? My does not. Go to your hosting administration and look for: HTACCESS or Mod_rewrite settings and allow those.

Categories : Wordpress

Wordpress links/site title won't work
Here is how to fix your permalink structure. Download a copy of your WP database from your live site by going to: tools > export. Open the file in a text editor. Find all instances of your current site url's and replace it with your test sites url. Only the URL, not pages. From: www.website.com to www.website.com/test. Also look for WP admin related pages. You might have to do a bit of trial and error until your able to completely change all instances of the site url. Save and upload it to your test server, and you should be good to go. This works for either way. Moving WP form Development to Production or moving Production to Development. Pro Tip: You can also do replace with a bit of SQL. UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldsiteurl.com', '

Categories : PHP

How are action links for posts added in WordPress?
you use the add_filter hook so for example if you want a link to search google for the page title. add this to your functions.php function search_google($actions, $page_object) { $actions['google_link'] = '<a href="http://google.com/search?q=' . $page_object->post_title . '" class="google_link">' . __('Search Google for Page Title') . '</a>'; return $actions; } add_filter('page_row_actions', 'search_google', 10, 2); for a Custom Post Type add_filter('page_row_actions', 'search_google', 10, 2); function search_google($actions, $post) { if ($post->post_type =="YOUR_POST_TYPE"){ $actions['google_link'] = '<a href="http://google.com/search?q=' . $page_object->post_title . '" class="google_link">' . __('Search Google for Page Title') . '</a>

Categories : PHP

Relative image links in Wordpress themes
You do have to do it like this; <div id="Title_logo"> <img src="<?php echo get_template_directory_uri(); ?>/images/Logo.png" /> </div> Then it will also work if you install your theme on another server. See: http://codex.wordpress.org/Function_Reference/get_template_directory_uri#bodyContent The way you did it in you example (src="images/Logo.png") points the browser to your root folder, because the whole Wordpress cms is build from the index.php in your root folder. So you have to tell your browser (via php) that the image is in the images directory in the theme-directory. The css file is also loaded that way, but calls his referrals to related files from the place where it exists. (the theme-directory). So in css you can refer to your files like you norm

Categories : HTML

Wordpress migration issue- links/media
Perhaps this can be avoided if you override the path where Wordpress looks for your assets, e.g. moving the wp-content folder. In short, try adding the following to your wp-config.php: define( 'WP_CONTENT_DIR', $_SERVER['DOCUMENT_ROOT'] . '/barlet' ); define( 'WP_CONTENT_URL', 'http://your-full-url.com/barlet'); This will force Wordpress to look for the assets in the specified paths e.g. fqdn.

Categories : Wordpress

How can I remove Links from all gallery images in Wordpress?
I've ran into this problem a few times as well. It took some searching, but eventually I found a super cool little plugin that makes it extremely easy to get rid of the anchor tags when using the gallery shortcode. Install the plugin and activate it, then when you insert the shortcode, use this: [gallery link="none"]. After the plugin is activated all you have to do is add the link="none" to your gallery shortcode You can find the plugin here: http://wordpress.org/plugins/gallery-linknone/

Categories : PHP

Wordpress links to images from posts broken
i found a similar question here MySql Regex Find and Replace for Wordpress and this plugin looks promising http://wordpress.org/plugins/search-regex/

Categories : Wordpress

Is it possible to create custom menus in WordPress with titles without links?
Yes, It is possible. You can use the walker. Put the following class in your functions.php file class themeslug_walker_nav_menu extends Walker_Nav_Menu { // add main/sub classes to li's and links function start_el( &$output, $item, $depth, $args ) { global $wp_query; $indent = ( $depth > 0 ? str_repeat( " ", $depth ) : '' ); // code indent // depth dependent classes $depth_classes = array( ( $depth == 0 ? 'main-menu-item' : 'sub-menu-item' ), ( $depth >=2 ? 'sub-sub-menu-item' : '' ), ( $depth % 2 ? 'menu-item-odd' : 'menu-item-even' ), 'menu-item-depth-' . $depth ); $depth_class_names = esc_attr( implode( ' ', $depth_classes ) ); // passed classes $classes

Categories : PHP

How to add links of a custom image sizes in wordpress post?
Well, you need to obtain thumbnail URL. Look at Wordpress Codex, there is an example that perfectly fits your needs and it even shows given URL only if given thumbnail size is available: http://codex.wordpress.org/Function_Reference/get_the_post_thumbnail#Post_Thumbnail_Linking_to_large_Image_Size

Categories : Wordpress

url rewriting or chage urls for wordpress website links
Settings > Permalinks Change it to the format you want there, using the Custom Structure option. Copy and paste the below code into there and it will change across your website: %category%/%postname%/

Categories : PHP

Wordpress - Adding default value to dropdown that links to no page
By adding an <option> in the <select> and a slight change in the javascript onChange event by checking if the selected option value is not empty : <?php $mypostype = get_posts('post_type=rentals'); if($mypostype) : ?> <form action="" id="myform"> <label for="myselect">Rentals</label> <select id="myselect" name="select_post_type" onChange="((this.options[this.selectedIndex].value != '') ? document.location.href=this.options[this.selectedIndex].value : false);"> <option value="" selected="selected">Select Rentals</option> <?php foreach ( $mypostype as $mypost ) : ?> <option value="?rentals=<?php echo $mypost->post_name; ?>"><?php echo $mypost->post_title; ?></option>

Categories : Wordpress

jquery menu ui. Auto expand 3rd level submenu when 2nd level submenu is expanded
Yes, focus and expand is what you need. You don't need .show(). I am not sure whether your mouseover will not conflict with the normal menu events handling. For the beginning, to get at least something simple working, a code like below could automatically expand the submenus after menu creation (to simplify the selectors maybe you could add ids to your menu items, I have doubts whether your selectors select what intended): $("#main-nav").menu() .menu("focus",null,$("#main-nav > li.first")) .menu("expand") .menu("focus",null,$("#main-nav > li.first > ul > li.first")) .menu("expand"); In the current jquery-ui-1.10.3 + jquery-2.0.3 this code actually fails with some null element access... It is a bug in jquery. I can't find the bug ticket now but I saw that it was already res

Categories : Javascript

Wordpress Anchor links adjust margin for fixed header
Are you willing to use some jQuery? http://imakewebthings.com/jquery-waypoints/shortcuts/sticky-elements/ When setting up my own fixed header I ended up using this technique. Mainly for 2 reasons: 1) iOS support. position:fixed support is not really there on iOS devices. 2) You can specify offsets to counter exactly the problem you are having. If you don't want to use jQuery. The CSS only solution is to assign a class to your anchor links. <a class="offset"></a> a.offset{ display: block; position: relative; top: -125px; //at least the negative height of your header visibility: hidden; }

Categories : HTML

Wordpress limit footer menu to 4 links before starting a new list
I'm sure this question has long been answered but I ran across it while trying to figure out something similar so I figured I'd post what I found. While it isn't exactly what you were looking for it's possible to use CSS Column Count to come close. You can check out the same Fiddle I found here. This sure helped me so I figured I'd pass it along. Cheers! Daniel div#multiColumn { -moz-column-count: 2; -moz-column-gap: 20px; -webkit-column-count: 2; -webkit-column-gap: 20px; column-count: 2; column-gap: 20px; }

Categories : PHP

Wordpress pagination links empty on custom post type query
Here's the full functional code you can modify to fit your needs: // Note that on your site's blog page the query var is page, not paged // everywhere else it is paged $curpage = (get_query_var('page')) ? get_query_var('page') : 1; $snapshotargs=array( 'posts_per_page' => 10, 'post_type' => 'qd_galleries', 'qd_galleries_cat' => 'snapshot', 'paged' => $curpage ); query_posts($snapshotargs); $pagecount = $wp_query->max_num_pages; while(have_posts()):the_post();?> <h1><a href='<?php the_permalink();?>'><?php the_title();?></a></h1> <p> the_excerpt();?></p> <?php endwhile; ?> // Note that the pagination is outside of the loop <p class='pagination-links'> Showing page <?=$curpage;?> of &

Categories : Wordpress

Tracking custom image links on WordPress website by Google Analytics
(function ($) { $(document).ready(function() { // Attach onclick event to document only and catch clicks on all elements. $(document.body).click(function(event) { // Catch the closest surrounding link of a clicked element. $(event.target).closest("a,area").each(function() { _gaq.push(['_trackEvent', 'Image Click', $('img', this).attr('alt'), $(this).attr('href')]); }); }); }); })(jQuery); Yeah is possible you can track the image click via google analytics See this reference for more info. http://techatitsbest.com/blog/image-click-tracking-google-analytics-events http://www.seotakeaways.com/event-tracking-guide-google-analytics-simplified-version/

Categories : Wordpress

Make wordpress custom anchor links scroll below fixed header
EDIT Here is a way to do it with jQuery. Since I didn't test it, so there might be some error. Let me know: jQuery(document).ready(function($) { var scrollOffset = $('.header-wrapper').outerWidth(); $('#nav a').on('click', function(e) { var regex = new RegExp(/#(.*)/), url = $(this).attr('href'), search = url.match(regex); if(search === null || search[1] === '') { return true; } var element = $('#' + search[1]); if(element.length) { e.preventDefault(); var scrollTo = element.offset().top - scrollOffset - 20; $('html, body').animate({ scrollTop: scrollTo }, 'fast'); return false; } return true; }); }); OLD COMMENT

Categories : Jquery

A Comprehensive Regular Expression to find URL, links,page links, website links from HTML Page or String
Have a look here http://regexlib.com/Search.aspx?k=URL&AspxAutoDetectCookieSupport=1 You can find a lot of examples and patterns there and there are a lot of general Regex tutorials and articles. After a quick browse I found this : ([dw-.]+?.(a[cdefgilmnoqrstuwz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvxyz]|d[ejkmnoz]|e[ceghrst]|f[ijkmnor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eouw]|s[abcdeghijklmnortuvyz]|t[cdfghjkmnoprtvwz]|u[augkmsyz]|v[aceginu]|w[fs]|y[etu]|z[amw]|aero|arpa|biz|com|coop|edu|info|int|gov|mil|museum|name|net|org|pro)(|W(?<!&|=)(?!.s|.{3}).*?))(s|$) Should do the trick, but I'm sure there are more elegant examples on that list.

Categories : C#



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