Link to my wordpress blog in main menu is "dead"? - wordpress

I 've created a website www.milan-kresojevic.com.Everything is fine and now installed wordpress blog plugin to my server and started building a blog to.You can notice that when you come to the main menu on this website,and right click on the "Blog" button,you can open it in new window so the link seems to be working.BUT...
When you left-click on in as every normal link- it doesn't work :/
This is a bit confusing,and I've tried changing it in a zillion ways,and it is still the same.
Right-click "open in a new window" works,and left-click doesnt :(
Does anybody have an idea how should I change it?
Thanks in advance...
:)
SOLVED!Like this:
Ok,I ma going to show you what I did,so that this post might actually help someone else :)
My HTML nav code was this:
http://imageshack.com/a/img850/4371/40g8.png
So I listened to the nice man above me :)
And did this with the github source:
add the imageshack url in front of this I can not post 2 links as a new user :/a/img850/6605/uxs5.png
Found this on the github and my regular jquery.nav.js with this right here :https://github.com/davist11/jQuery-One-Page-Nav,
and added some JS code at the bottom of my page :
$(document).ready(function() {
$('#nav').onePageNav({
filter: ':not(.external)',
});
});
And that was it :) All works now,and I hope this is detailed enough to help someone else :)

your problem is the jquery.nav plugin. which expects only links linking to anchors on the page. try adding the class 'external' to the specific items and it should open the link as expected.

Related

Custom page template on Wordpress 6.0 not shown when i edit a page

i've created a php file in my theme folder named page-test.
When i try to bind this template to any page, i can't see it
Impossible to guess what is the problem. Someone could help me ?
Thx
Can you make sure your child theme is activated, i mean where you put your file, also can you change file name to page_test.php
Let me know if problem fixed.
Ok i got it.
It's not in "page attribute" anymore but in the "modele (in french)" part.

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 open a link in a new tab in wordpress?

How to open all links in Wordpress in a new tab? I am using a Child Theme of Sydney wordpress. I do not know coding. Thanks for any help
Open up your /index.php file and pop this within the <head> tag.
<base target="_blank">
P.S. If your not able to do this. It might be best to do at-least a tiny bit of research about web code and Wordpress.
If you want the menu items open in new tabs then there is an option for that in menu options. please see below images
tick link target option
open link in new tab
If you want all external links open in new tabs , then
I tried a few plugins for this, and “Open external links in a new window” was my favorite.Search it in plugin page, install it. It will work well. :)
jQuery
jQuery( document ).ready(function() {
jQuery("a").attr("target", "_blank");
});
without jQuery
<base target="_blank">

Anchors not working on search results page using woocommerce

I am developing a site for a client using Wordpress and Woocommerce and have an issue where I can not click on any of the anchors on the search results page.
The search results page is here: http://79.170.44.83/newcityused.com/?s=chair
I can see nothing in the CSS that would make this happen.
I have deactivated all of the plugins with no joy.
I'm lost.
Has anyone else experienced this or know of a solution?
You have a class .search inside your 'body' tag and then you have a js that is something like this:
jQuery(function(){
jQuery('.search').on('click', function(e) {
jQuery('.search-form').toggleClass("expand");
e.preventDefault();
});
})
I think that you are preventing the default clicks in here... so remove the e.preventDefault it made work, let me know...

Bug with AddThis Wordpress plugin

I got two pages:
1-http://www.aotopo.com.br/servicos/
2-http://www.aotopo.com.br/blog/
In both pages I inserted The addThis plugin.
Local testing is perfect for both, but online just the first one is working.
In 2nd the addThis plugin is located at post-content (just before the "Leia Mais" buttons).
(function help(){
if(somebodyKnowWhy){
pleaseHelpMe();
console.log("Thank you!");
}
})()
If somebody stumbled up in the same issue, I found the answer by a Wordpress.org member (srijith.v) when I asked the same question:
#Erick: I couldn't find addthis_widget.js being imported to the page. How did you add AddThis? Did you use the plugin available for WordPress?
You will need to include http://s7.addthis.com/js/300/addthis_widget.js to the page to render the buttons.
I just added this js to my footer as a source of a script tag and voila.

Resources