Breadcrumb NavXT creating wrong href link - wordpress

I have used Breadcrumb NavXT plugin to create breadcrumbs for my site. I get the perfect breadcrumb trail as required but it creates a wrong href link for category page. How do I stop/solve that?
My required link :
http://www.example.com/category/xyz/
Plugin creates:
http://www.example.com/category/xyz/?post_type=netz_features
FYI: I have already asked for help from the plugin community but didn't get any response.
I would appreciate any help from you guys.
Thanks in advance.

Well I got the answer to my own question. But anyone searching for the same issue, please follow these steps to save your day :)
To Remove post_type from Breadcrumb NavXT URLs, just copy & paste the below code into a site specific plugin.
add_filter('bcn_add_post_type_arg', 'my_add_post_type_arg_filt', 10, 3);
function my_add_post_type_arg_filt($add_query_arg, $type, $taxonomy)
{
return false;
}
The above code is the most basic code that disables adding the post_type query argument for all resources.

Related

How to disable a route or permalink in wordpress?

In my wordpress dashboard I've got a link called "che passa". When I click on it, I can create articles and the route will be for example => "www.website.com/che-passa/test"
I need to disable the link "che-passa" and I really don't know how to do it. Are there any wordpress developpers here ?
I found the archive.php and I deleted all the code and replace it by =>
wp_redirect(home_url("")); exit(); And it work :)

content area not found in my page with elementor

I just started with Wordpress and I published a website a few weeks ago. Today I wanted to edit the homepage, but I get the following error:
Sorry, the content area was not found in your page. You must call the_content function in the current template, in order for Elementor to work on this page.
I haven't edited my homepage and it worked perfectly a couple of weeks ago. Is there someone that can help me fix this issue?
If you are using any shortcode on your page and you are fetching post on that page and looping through the post in a while loop. Please add this after the loop ends. No sure why but this always cause issue for me.
wp_reset_postdata();
Code will look like this:
$posts= new WP_Query($args);
while ($posts->have_posts() ) : $posts->the_post();
.....
.....
.....
endwhile;
wp_reset_postdata();
It doesn't matter it's a shortcode or what if we are doing something like above make sure to add wp_reset_postdata();
This is one of the issues that I usually face. There can be other reasons too.
Probably you've edited the page template from Templates -> Theme Builder -> Single. Anyway, even if you don't, you can fix it that way: Go to Templates -> Theme Builder -> Single -> Add New, then select page and create a template for all single pages (make sure that you drag the page content widget in the template). This should overwrite your theme single page template (which misses the content function).
Just make sure your 'Home Page' and 'Posts Page' are different, otherwise you get your page mixed up and this error occurs.. Worked for me!
You can verify this setting in Appearance>Customize>Homepage Settings :)
The Answer to this error is to check the structure of your permalinks. Try to save your permalinks one more time. Also, try to change the permalink structure to “Plain”. Some servers do not allow to write to the .htaccess file and as a matter of fact, you cannot always modify your permalink structure and edit with Elementor.
I found myself in the same place yesterday and freaked for a moment and did some research to find out why I was receiving the error and came across this page. Believe for me it occurred due to the situation Ed Jones posted about above, I had inadvertently edited the post template. But a fast and easy fix was to go back to an earlier revision of the page in my history. That solved my problem quickly.
Add the_content() at the end of your templates

How to hide the word (--wordpress) at browser tab from login page of WordPress?

I'm trying to remove the word (-wordpress) from browser tab of login page but couldn't figure it out. Will be great if anyone could help here.
As it shows in the screenshot, im trying to remove the highlighted in yellow. Thanks
You'll want to do this in your theme's functions.php file. Here are some modifications that you can use:
function my_login_logo_url() {
return home_url();
}
add_filter( 'login_headerurl', 'my_login_logo_url' );
function my_login_logo_url_title() {
return 'Your Site Name and Info';
}
add_filter( 'login_headertitle', 'my_login_logo_url_title' );
For more information, please refer to the WordPress Codex page here.
I have to say I have found what you were looking for!
You'll have to head over to the 'wp-login' file and search for the $login_title attribute.
There you'll have to search for the word 'Wordpress' itself and erase it.
I fount mine on line 72.
You'll see the word as a string inside the parenthesis.
You'll have to go to the public_html and find the file there and change it.
I really hope It helped!
Good luck to anyone who reads it!

woocommerce pagination not working

On my locally hosted site is the woocommerce pagination not working properly.
When I use http://localhost/sample-post/ the second page is a wrong one. I'm landing on an attachment page instead of the second product page.
When using http://localhost/?p=123 it works ok.
Anyone an idea?
Is it because I'm working locally and will it not be on a remote server? I've read something about that. Need confirmation.
EDIT
Went worse.....
I have to translate the site in different languages using WPML. When using the default permalinks WPML complains. When using another structure (see above) and in WPML the setting for a different folder for each language I got pages with no result (except for a message from woocommerce that no products were found.
EDIT 2, February 18th, 2015
I start to wonder if it is even possible to set the WooCommerce shop page as the Front page. The support team of WooCommerce is puzzled as well and are wondering too if it is possible. I hope someone has experience with it or an example of a site on which it works.
Please, can anyone help me out here... I'm struggling now for a long time and I'm not able to solve this myself.
your permalinks settings need adjusting. in wp-admin go to settings>permalinks>common settings, and set "per post." check your product permalink base as well.
Please use this function for correct woocommerce pagination. please use this function inside the function.php
add_filter( 'woocommerce_pagination_args', 'rocket_woo_pagination' );
function rocket_woo_pagination( $args ) {
$args['prev_text'] = '<i class="fa fa-angle-left"></i>';
$args['next_text'] = '<i class="fa fa-angle-right"></i>';
return $args;
}

Wordpress Job Manager Pagination Issue

I am using the Wordpress Jobs Manager plugin. It all works great except the pagination feature. When enabled, the pagination buttons just redirect the user to the homepage instead of to the paginated page of results. As far as i can tell this is a problem with permalinks but i wondered if anyone had a workaround as i cannot use the standard permalinks on my site.
Does anyone know of any possible fixes? Its a custom built theme.
Thanks for you help guys
I know its a long time since you posted, but i had this issue today and came across your post.
I did some investigating and found it to be a problem with the way wordpress was dealing with the rewrites for canonical redirects.
I did a search on the internet and found the following post on wordpress.stackexchange.com by Celine Garel which deals with this situation for custom post types, i just changed it to work with a page.
https://wordpress.stackexchange.com/questions/134339/pagination-on-custom-post-type-not-working-if-permalinks-set-to-rewrite-url
Add this to your themes function file,
add_filter( 'redirect_canonical','custom_disable_redirect_canonical' );
function custom_disable_redirect_canonical( $redirect_url ){
if ( is_page('Your_job_list_page') ) $redirect_url = false;
return $redirect_url;
}
This fixed it for me. Hope it helps you or anybody else.

Resources