How to translate breadcrumbs
How to translate breadcrumbs
How to translate breadcrumbs
My guess would be that go.php is located in the root of the WordPress install. The code in that fild would be something like this. <?php require ‘wp-config.php’; $post = get_posts([ ‘post_type’ => ‘post’, ‘orderby’ => ‘rand’, ‘posts_per_page’ => 1, ]); if (!empty($post)) wp_redirect(urldecode(get_permalink($post[0]))); This is a wild guess but it does the job. This … Read more
There are some issues in your code, e.g. $pages will always return an array, even where there are no results in which an empty array is returned, so if ( is_page() && $pages ) return true; does not necessarily mean that “we’re at the page or at a sub page“. Instead, it means, “as long … Read more
Sounds like you’re looking for has_category(), which Checks if the current post has any of given category. You would use it, for example in single.php, like so, <?php if ( has_category( array( ‘cat-a’, ‘cat-b’, ‘cat-c’ ) ) ) : ?> <div> <?php echo do_shortcode( ‘some_shortcode’ ); ?> </div> <?php endif; ?>
how to replace h1 entry title with h2 in category pages only
Have seen it now, lastname and consent have $POST instead of $_POST, $POST it will be a php variable, the correct is $_POST. Maybe the error is that all along. Anyhow, with query must work, if it doesnt or is the sql statement not correct or there is no connection with the database global $wpdb; … Read more
How can I create a WordPress dynamic download counter
WordPress create custom XML RSS feed template
Trying to update Woocommerce meta values
Found the solution. Is anybody facing the same please check this. My code is right, but because of the offset parameter pagination is not working. I found the solution here. So, this is my final code: <?php $paged = ( get_query_var(‘page’) ) ? get_query_var(‘page’) : 1; $per_page = 10; $defualt_offset = $offset; if ($paged == … Read more