display woocommerce all category title on home page

<?php $post_type=”product”; $taxonomies = get_object_taxonomies((object) array( ‘post_type’ => $post_type )); foreach ($taxonomies as $taxonomy) : $terms = get_terms($taxonomy); foreach ($terms as $term) : $term_link = get_term_link($term->term_id); $posts = new WP_Query( “taxonomy=$taxonomy&term=$term->slug&posts_per_page=2″ ); ?> <li> <h2> <a href=”https://wordpress.stackexchange.com/questions/218036/<?php echo $term_link; ?>”><?php echo $term->name; ?></a> </h2> <?php if( $posts->have_posts() ): while( $posts->have_posts() ) : $posts->the_post(); ?> <div> … Read more

front end publishing not working on front-end page

thanks to @TheDeadMedic, I found the solution. I used reserved terms, and that’s why WordPress interpreted my inputs as query parameters. so for example with my categorys, I had to change my classes in my form : ‘post_category’ => array($_POST[‘cat’]), // Usable for custom taxonomies too by ‘post_category’ => array($_POST[‘my_cat’]), // Usable for custom taxonomies … Read more

https multiple redirects

This is somewhat of a guess, but it is probably a result of the web server configuration. What your server probably does is to see that the request want to load the blog url of the site. It checks out and sees that blog is a directory adds a slash and redirects to it. Now … Read more

All pages showing up as homepage on WordPress website

I have seen this before. It was caused by a permalink saving error, in my case. Go to Settings >> Permalinks. Select a different permalink option than the one you’re currently using. Click “Save Changes” Select the permalink structure you want to use. Click “Save Changes” That fixed it when I encountered the same situation.

Top level Pages redirecting to homepage!

It turns out that, I was using “year” as a custom taxonomy, which was part of the reserved terms of WordPress!!! With using the reserved term, it will return the 404 error for the top level pages, hence the redirection to the home page. !!! Listed here: https://codex.wordpress.org/Function_Reference/register_taxonomy#Reserved_Terms