how to make URL link query string

This is how I got it working: ADDED this to functions.php: function include_template_function( $template_path ) { global $wp; if ($wp->request == ‘state’) { $template_path = locate_template( array ( ‘state.php’ ) ); } return $template_path; } $state_name = $_GET[‘st’]; //this is added to use as a global variable ADDED THIS to header.php because WP thinks it’s … Read more

Removing rel=”nofollow” from links posted in Post Content

These links are generated by alx_social_links() function. So in your theme’s functions.php file, search for alx_social_links() function and this link specifically. echo ‘<li><a rel=”nofollow” class=”social-tooltip” ‘.$title.’ ‘.$link.’ ‘.$target.’><i ‘.$icon.’ ‘.$color.’></i></a></li>’; and remove rel=”nofollow” from it. So this will be the new link. echo ‘<li><a class=”social-tooltip” ‘.$title.’ ‘.$link.’ ‘.$target.’><i ‘.$icon.’ ‘.$color.’></i></a></li>’; It will remove nofollow tag … Read more

wordpress count link clicks by ip address

What would you do if the user uses a proxy and randomizes his IP address? There are numerous browser plugins to simplify that to a click of a button to download multiple times. The same goes for cookies. Aside from that you are trying to collect data that allows to identify users, which is illegal … Read more

Link to Homepage in Menu

You can take the following steps Go to You Dashboard Click Appearance > Menus Under Pages, Click View All There will be a ‘Home’ option Check that Home Option Click ‘Add to Menu’ The new Menu item will appear in the right block Drag the home menu to the top Save the menu

All Images on wordpress site broken

It’s due to AAM (Advanced Access Manager) plugin. You have different options to fix the issue. 1) Disable AAM Media Manager plugin 2) You can changes AAM Media Manager plugin version 3) If you do not want AAM to handle your website images, Go to the following file /advanced-access-manager/extension/AAM_Media_Manager/extension.php and find private $_skip = false; … Read more

Fragment URL in navigation item without a custom link

You can modify the href attribute of specific menu items when the menu is generated. function wpd_convert_menu_items_to_hash( $atts, $item, $args ) { if( $somecondition ){ $atts[‘href’] = ‘#’; } return $atts; } add_filter( ‘nav_menu_link_attributes’, ‘wpd_convert_menu_items_to_hash’, 10, 3 ); In this example, $somecondition is whatever way you’re identifying these menu items. $item gives you access to … Read more

How to add an image from web-link?

This is some specific shortcode to some plugin, that if you just want to paste an image in wordpress editor isn’t necessary. (Also there is not enough info about what this shortcode is about). So there is simple HTML that will simply display link you want as an image, following: <img src=”http://here-goes-some-url-of-your-image” /> Make sure … Read more

Linking to the most recent post in a Custom Post Type

As long as Pods creates standard custom post types, you can simply update the arguments passed to WP_Query . The$post_type parameter will allow you to filter the results based on the specified post type (string) or post types (array). $latest = new WP_Query( array( ‘category_name’ => $request->query_vars[‘category_name’], ‘posts_per_page’ => 1, ‘post_type’ => array ( ‘post’, … Read more

Link that refers to a menu item with dynamically generated URL

You can use the wp_get_recent_posts function in your own custom function. Something like this should work: function get_recent_post_link(){ // Restrict to latest post $args = array( ‘numberposts’ => ‘1’ ); // Get the post $latest_post = wp_get_recent_posts( $args ); foreach( $latest_post as $the_post ){ return get_permalink($the_post[“ID”]); } } You can the call the function in … Read more

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