the_posts_pagination() not working if I add wp_head() to header.php
the_posts_pagination() not working if I add wp_head() to header.php
the_posts_pagination() not working if I add wp_head() to header.php
I solved the problem in this way. Maybe someone will need it. Configured the modal window so that a cookie is created when the window is closed. Launched a modal window until the user closes the window and a cookie is created. Here is the code: … if ( ! isset( $_COOKIE[“pum-909”] ) ) { … Read more
You can add the action on the init itself, just increase the priority of the add_action call. The higher the priority the later the function is called. add_action(‘init’, ‘retrieve_my_terms’, 9999); But my suggestion is that you should do these kind of things as late as possible, preferably just before the first time they are used. … Read more
Most of the cache plugins have built-in CDN settings. If you are looking for a simple solution for the image URL only, you can use CDN Enabler. It is from KeyCDN but you don’t have to use KeyCDN for it to work. Simply Write your alternative domain to only use image extensions if you don’t … Read more
You can use empty, to check your variable. Something like this $prod_id = get_the_ID(); if (!empty(get_post_meta($prod_id,’_product_tech’,true))) { echo'<a class=”shutter” title=”technische gegevens” href=”‘.get_post_meta($prod_id,’_product_tech’,true).'”><img width=”750″ height=”100%” src=”‘.get_post_meta($prod_id,’_product_tech’,true).'”></a>’; } else { //Is empty }
This is not possible, a PHP file can only contain a single page template. There is no way to combine the files.
I am unsure how your site is set up, but typically the get_header and get_footer is called in a template file. If you are using the typical template hierarchy, then your single pages are using single.php and both get_header and get_footer can simply just be removed from that php file.
Well I figured out I could duplicate the function and rename the title so it runs twice. But for future, is there a more elegant way of doing this in one instance? thanks! // orderby slideshows function modify_slider_order($query, $slider_id) { // only alter the order for slider with “x” ID // https://tinyurl.com/zb6hzpc if($slider_id == 17 … Read more
There is an issue with the latest version of WPML that causes this problem. WPML has a quick fix for this: https://wpml.org/errata/endpoints-containing-slashes-are-incorrectly-encoded/
First of all, I would n e v e r automatically delete files, database entries, whathaveyou. Too risky. But, I created this once, that moves files to a ‘trash’ folder. This will help you get where you want: /** * Autodelete folders in upload dir */ add_action(‘admin_init’, function () { $time_to_live = 60 * 60 … Read more