How to echo a dynamic url

There are two workarounds: If the first line you’re mentioning is inside a void function: You have to create a wrapper function and use ob_ functions to get the real link: <?php function echo_link($post, $landing_page) { global $myfy; echo $myfy->get_retrieve_cart_url( $post->ID, $landing_page ); } function get_link($post, $landing_page){ ob_start(); echo_link($post, $landing_page); return ob_get_clean(); } // And … Read more

I changed my url and cant access my site, Help?

If you were attempting a site migration you should have backed up all your files and database tables before changing your URL. When you change your site URL (presumably from the Settings->General option page), you are essentially modifying every link on the site to point to the new URL. If that URL is not setup … Read more

Is There a Way to Schedule URL to Content Updates?

Not sure if I’m understanding you correctly, but if you want to display a special of the day, depending on the day … I have a rough representation of how you could go about doing so. Example: $current_day = date(‘N’);// 1 (for Monday) through 7 (for Sunday) – daily/weekly //$current_day = date(‘j’);// 1 to 31 … Read more

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

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

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

Enabling canonical links to force search engines to go to site.com rather than site.net [closed]

Canonical links are typically used when you have multiple URLs on the same domain pointed at the same content to prevent search engines from indexing duplicate content. In this case, redirecting the domain is probably the best option. You can do that either through the control panel for your domains or with a .htaccess file. … Read more

apply styling only to a specific url

Why don’t you add a class to body via functions if you are on that url, so you can use that class on css, like so: function add_class_to_body($classes) { if(is_page(‘events’)){ $classes[] = ‘page-events’; return $classes; } } add_filter(‘body_class’,’add_class_to_body’); Then you are able to target through .page-events div{ background-color: red; }

help me remove this additional parameter in url

The issue is caused by woocommerce. Woocommerce has a setting called Geolocate (with page caching support) which adds this parameter to every your url. The said option can be found in your dashboard at: Woocommerce → Settings → General → Default Customer Location Selecting any option apart from Geolocate (with page caching support) should resolve … Read more