URL/Domain remains when clicking on the subpages - WORDPRESS - html

I'm using wordpress for my website.
I entered the href links on the widgets footer but its not working properly only at the homepage.
Can you help me with my website?
The link at the footer section "services" is not working it is like duplicates the url and it will not refresh or go to the link I entered.
In homepage, the link is working but the other footer page doesn't work. [Here is the link][1].
On different sections the links set have different URLs.
For example the Custom Apparel one when accessed from the home page has - https://opti-advertising.com/offer/#custom link, while if accessed from Contact page it redirects to https://opti-advertising.com/contact/www.opti-advertising.com/offer/?page_id=20#custom.
CODE:
<ul style="line-height: 32px;">
<li><i style="color: #ff0084;" class="icon-layout"></i> Online Advertising Services</li>
<li><i style="color: #ff0084;" class="icon-layout"></i> Digital & Offset Printing Services</li>
<li><i style="color: #ff0084;" class="icon-layout"></i>
Custom Apparel</li>
<li><i style="color: #ff0084;" class="icon-layout"></i>
Traditional Advertising Services
</li>
<li><i style="color: #ff0084;" class="icon-layout"></i>
Marketing Giveaways
</li>
</ul>

You are just hardcoding the links in your footer, e.g. placing links to the footer like this:
Link
When you access this link from homepage, CMS serves it from the root of your site, and you get the right address:
www.opti-advertising.com/offer/?page_id=20#printing
But if you click this link from any secondary page, you will get the address like this:
www.opti-advertising.com/page/www.opti-advertising.com/offer/?page_id=20#printing
because CMS serves the link from current page, which has path of
www.opti-advertising.com/page/
To solve this, you should at least remove domain name from the url and prepend a slash to it:
Link
But the best approach – is to do things right – generate links dynamically. Wordpress gives you some snippets, for example
site_url();
With this you can do things like:
Link
which will on any page output this:
https://www.opti-advertising.com/offer/?page_id=20#printing

Related

How to add existing WordPress menu item links to custom designed new header?

I designed a custom header for my website. The website is not fully designed, so I kept the old theme and just changed front-page.php with new-header.php and new-footer.php include.
I linked existing menu items in new-header.php like below,
<li class="">
<a class="nav-link" href="/about-us/">About Us</a>
</li>
When I connect blog,
<li class="">
<a class="nav-link" href="/blog/">About Us</a>
</li>
it's working. (it's a different folder outside wp-content)
but when I connect other pages like about us / contact us, it's showing critical error.
Has anyone experienced this kind of issue? please let me know...
Few points needs to cross check
Hope you have defined new header like
get_header('new');
Please refer to for more details
https://www.webascender.com/blog/how-to-create-multiple-headers-footers-in-wordpress/
Resave your permalinks.

The home page translation link is static and is not used to translate all pages

I have a problem I hope to solve it as I display in the navbar languages ​​used in the site and I want whenever you click on the language the page appears with the translation in all pages and not only the main page ,with the translation link changes with each page
http://127.0.0.1:8000/fr/
http://127.0.0.1:8000/fr/our-company
So add on the home page link.
How to fixed the link on the home page so that the translation is displayed for all pages and keep on the same page translated
Navbar home page in all pages
<ul class="navigation__dropdown-wrap--language">
<li>
<a data-culture="ar" data-lang="True" href="/">العربية</a>
</li>
<hr>
<li>
<a data-culture="en" data-lang="True" href="/en/" lang="en">English</a>
</li>
<hr>
<li>
<a data-culture="fr" data-lang="True" href="/fr/" lang="fr">français</a>
</li>
<hr>
</ul>
Try looking into Django's i18n package. It comes with full support for translations, timezones and locales. (Numbers and dateformats).
The package comes with support for internationalized URLs.

Change links from scrolling on same page to pointing to different pages

I am modifying a site that has a menu with the following code:
<h3>Menu</h3>
<ul class="nav">
<li><a data-scroll href="#home">Home</a></li>
<li><a data-scroll href="#services">Service</a></li>
<li><a data-scroll href="#contact">Contact</a></li>
</ul>
As a user clicks on those links the user will be taken to the corresponding section on that page.
I need to modify this to allow for links that do not point to the same page.
I tried the obvious:
<h3>Menu</h3>
<ul class="nav">
<li>Google</li>
</ul>
but it won't work.
The status bar shows the correct link but when I click the page won't change.
Is there any special code I need to add (links on other places of the page work fine).
As we discussed, Javascript (specifically jQuery preventDefault) can override the default behavior of an anchor (that is to say, follow it). Therefore, check all Javascript for this situation.
Also, a link MUST have an http:// in front of it, to define the resource type. Links only work on the same page or domain if there isn't one.
It is clear to me that
Google
Will not work because you should write it like so:
Google
Give that a try, if the answer is not this, then you should share with us what else you are doing on your site that we cannot simply imagine by the snippet you have shared with us.

hash in url does not load different page

In my nav I have a link to View Profile, Edit Profile and a link to My Projects. The url structure looks like this:
/users/username <-- View Profile
/users/username/edit <-- Edit Profile
/users/username/edit#my-projects <-- My Projects
My href links are those exactly, now if I am on my homepage or any other page besides /users/ it will open Edit Profile and then My Projects tab on that page when you click the My Projects link in the nav. However, if you have clicked View Profile first and then click My Projects it will just append the hash #my-projects to the end of the current url /users/username#my-projects instead of going to /users/username/edit#my-projects.
Is there something I am missing when linking to another page and having a hash at the end of the link?
********UPDATE********
<ul class="dropdown-menu pull-right">
<li>View Profile</li>
<li>Edit Profile</li>
<hr>
<li>My Projects</li>
<hr>
<li>Log out</li>
</ul>
I don't think this will help, but I am using zf2 if that changes how routing works or not.
Unfortunately, I do not have an example outside of local and production.

Heart/Like Button Linked to Individual Items in a List

Trying to add heart/like buttons on each individual link in a list in Wordpress.
You can see it here : http://theroadmap.co/strategy/.
I want the likes/fav be linked to the items, and not to the individual post (I have over 20 links in one post, split into 5 sections).
I used shortcodes of several plugins (ZillaLikes) and they always mess up the CSS + are linked to the individual post and not the item themselves.
You can see my HTML code of one of the sections of a post below:
<ol class="rectangle-list">
<li class="tooltip" title="What does a startup CEO actually do?"><a href="LINK TO ARTICLE </a></li>
<p>What does a startup CEO actually do?</p>
<li class="tooltip" title="How to find your competitive advantage">Be the Company Customers Can't Live Without</li>
<p>How to find your competitive advantage</p>
</ol>
Thanks!
Dan.
I would suggest something simple like Font-Awesome. It's very easy to add to your site where-ever you want it and control size, colour etc via CSS.
Font-Awesome
For example a solid heart icon would be added like
<i class="fa fa-heart"></i>