How do I fix the url when clicking on portfolio item?

You could do it with jQuery: jQuery(document).ready(function($) { $(‘a[href*=#]’).on(‘click’, function(event){ event.preventDefault(); }); }); Save that to a file (something.js) and upload it to your server. Then add the following to your functions.php (remember to set up a child theme if you aren’t using one): add_action( ‘wp_enqueue_scripts’, ‘prefix_load_scripts’ ); function prefix_load_scripts() { wp_register_script( ‘something’, get_stylesheet_directory_uri() . … Read more

Why plugin’s icon for the menu not found?

Sometimes i find wordpress can be quite finiky when it comes to referencing files within the plugin. Specifying a full path seems to fix the problem. Try replacing… market_admin/icon.png With… /wp-content/plugins/your-plugin-name-goes-here/your-file-name-goes-here.png

Function to get custom post image URL

Can you show us what the cp_get_image_url() function does? Is it from a plugin or theme? Is the image uploaded to the Featured Image or a Custom Field? Without knowing what that function is actually doing, the best I could come up with is this: <?php $media = get_attached_media(‘image’); foreach($media as $m) { $mee = … Read more

Append taxonomy url

You have at least 3 ways of accomplishing this. Option 1 The easiest is to change your permalink structure to “Post Name”, and then create your landing pages with the slugs you want. So, your slug for york would be “trainers-in-york”. Option 2 If you absolutely must modify the url, you can use add_rewrite_rule to … Read more

URL, which automatically close tab

You can’t. JavaScript can only close tabs/windows that have been created by JavaScript on the same page for security reasons. You could add a userscript that runs outside of page context and reacts to certain tags within the page, with Grease Monkey for example. But that would require the user to have that plugin + … Read more

img src not working correctly in custom post type

Add this following function to your functions.php of your theme or child theme. function homeURLshortcode() { return home_url(); } add_shortcode(‘homeurl’, ‘homeURLshortcode’); This will create a shortcode like [homeurl] which you can use to add in any visual editor and it will render as your main domain address, like http://domain.com. So for your image url you … Read more

Why my wordpress site URL does not begin with my domain?

I’ve had similar issues in the past, hosting two different sites with two domains on one host. Here are the two things that have helped me: Update WordPress Settings In the WordPress Admin Dashboard, go to Settings > General. You’ll notice that there’s the WordPress Address (URL) and the Site Address (URL). These control where … Read more