552 posts
  • Has been part of the Envato Community for over 5 years
  • Has referred 100+ members
  • Located in Canada
  • Has collected 100+ items on Envato Market
+1 more
OurWebMedia says

Hello,

Getting a little frustrated here with what should be a very simple task.

Client has requested that when the visitor selects a Category to view, the Archives page (containing that category) loads beneath the Header where we would have made an anchor situated for the page to load at.

Similar to what a “more” tag would do, but corresponds with the Categories instead.

However, I cannot seem to get this to work. Acts as though there isn’t even an anchor.

Can someone please point me in the right direction? I’d greatly appreciate any assistance.

Kind regards, Bryce

21 posts
  • Has been part of the Envato Community for over 4 years
  • Sells items exclusively on Envato Market
  • Located in United States
Wex says

I’m a little confused as to what your issue is. Are you trying to get the Archives to load on the same page, or are you having trouble having the browser load the new page in a spot where the anchor is at the top of the page?

If you want it to load on the same page, I’d have to make sure you’re using Wordpress before I give you any WordPress-related advice.

If you’re having trouble with the anchor tag, make sure that you actually have matching anchors. The URL hash should be #anchor at the end, and you should have your HTML tag <a name="anchor">anchor name</a>.

If you wouldn’t mind restating your problem, I wouldn’t mind giving you a hand.

-Adam

552 posts
  • Has been part of the Envato Community for over 5 years
  • Has referred 100+ members
  • Located in Canada
  • Has collected 100+ items on Envato Market
+1 more
OurWebMedia says
I’m a little confused as to what your issue is. Are you trying to get the Archives to load on the same page, or are you having trouble having the browser load the new page in a spot where the anchor is at the top of the page?

If you want it to load on the same page, I’d have to make sure you’re using Wordpress before I give you any WordPress-related advice.

If you’re having trouble with the anchor tag, make sure that you actually have matching anchors. The URL hash should be #anchor at the end, and you should have your HTML tag <a name="anchor">anchor name</a>.

If you wouldn’t mind restating your problem, I wouldn’t mind giving you a hand.

-Adam

Hello Adam,

Here’s the deal:

Mainpage has a sidebar, the categories are displayed here for the menu. When the visitor on the website clicks the “Category” title from the Menu, it loads a new page, the Archives page.

By default, you land at the top of the page when loaded. However, the header to the website is quite large and the client wants the visitor to be brought directly beneath the header so that the contents is the first thing to be seen for that category. Save time basically so the visitor does not have to scroll down to get to the contents.

So the idea suggested was to create a “anchor” so that instead of the Archives loading at the top of the page, you now load beneath the header where the anchor has been situated.

Does this make sense? I do appreciate your effort in helping. I’m still having absolutely no luck with this.

441 posts
  • Has referred 10+ members
  • Has sold $1,000+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Sells items exclusively on Envato Market
+4 more
pixelnourish says
By default, you land at the top of the page when loaded. However, the header to the website is quite large and the client wants the visitor to be brought directly beneath the header so that the contents is the first thing to be seen for that category. Save time basically so the visitor does not have to scroll down to get to the contents. So the idea suggested was to create a “anchor” so that instead of the Archives loading at the top of the page, you now load beneath the header where the anchor has been situated.

From my understanding of your description, this should work:

Current page: <a href="newpage.html#anchor">link to the different page</a>

New page: <div id="anchor">...</div> (or as shown above) <div name="#anchor">...</div>

This will gather the link to the new page, and “scroll” the page to the anchor, wherever it is placed on the site.

I hope that is what you’re after! :delicious:

552 posts
  • Has been part of the Envato Community for over 5 years
  • Has referred 100+ members
  • Located in Canada
  • Has collected 100+ items on Envato Market
+1 more
OurWebMedia says

From my understanding of your description, this should work:

This will gather the link to the new page, and “scroll” the page to the anchor, wherever it is placed on the site.

I hope that is what you’re after! :delicious:

I do appreciate your assistance but not exactly what I am looking for. So perhaps I’ll try and explain again:

- The website is a “WordPress” website.

- The sidebar is a “Widget Ready” sidebar.

- The “categories” widget is dropped into the Widget Ready Sidebar.

- The categories are displayed in the Sidebar on the website now.

- When a visitor comes to the website, they see the homepage, 10 posts and sidebar.

- Visitor clicks on a “Category” title from the Sidebar widget area.

- This now loads a new page, the “Archives” page for that category, now listing all the posts within that single category clicked.

Now, instead of the Archives page loading at the top, I want the Archives page to load where the loop is displayed, rather than at the top of the website (header). I want it to load where the anchor is placed, at the loop that is where the first post to that category is displayed and of course those to follow also in that category.

Does this make sense?

I don’t think I can explain it any better than that. I do appreciate the attempts in helping me. Really would like to resolve this issue.

Kind regards, Bryce

21 posts
  • Has been part of the Envato Community for over 4 years
  • Sells items exclusively on Envato Market
  • Located in United States
Wex says

Yes, your description absolutely makes sense. That is the default functionality of the Category/Archive. I am positive we are talking about the same thing, but I think you might be misunderstanding the steps to fix the problem.

What you need to do, is edit sidebar.php to include #content at the end of the link inside the loop, so your Category link has the anchor appended to the end. Then, in archives.php or category.php (whichever includes the content you wish to display), add the anchor bit to it. That is done by adding the name="content" attribute, as shown in the above posts.

So, when you’re all done, your category links should have #content attached to the end of all of them, so that when you click them, it automatically takes you to the anchor. Let me know if that fixes your problem.

552 posts
  • Has been part of the Envato Community for over 5 years
  • Has referred 100+ members
  • Located in Canada
  • Has collected 100+ items on Envato Market
+1 more
OurWebMedia says
Yes, your description absolutely makes sense. That is the default functionality of the Category/Archive. I am positive we are talking about the same thing, but I think you might be misunderstanding the steps to fix the problem.

What you need to do, is edit sidebar.php to include #content at the end of the link inside the loop, so your Category link has the anchor appended to the end. Then, in archives.php or category.php (whichever includes the content you wish to display), add the anchor bit to it. That is done by adding the name="content" attribute, as shown in the above posts.

So, when you’re all done, your category links should have #content attached to the end of all of them, so that when you click them, it automatically takes you to the anchor. Let me know if that fixes your problem.

Makes me feel silly but I do see exactly what you mean. Thank you for informing me of this simple fix.

Seems I misunderstood my client as well because now I’ve noticed he’s making use of ACE (Advanced Category Excluder) so now I see I have to edit the plugin itself. Hopefully this’ll be an easy task :P

21 posts
  • Has been part of the Envato Community for over 4 years
  • Sells items exclusively on Envato Market
  • Located in United States
Wex says

Even so, it should still be the same steps. Good luck fixing it.

552 posts
  • Has been part of the Envato Community for over 5 years
  • Has referred 100+ members
  • Located in Canada
  • Has collected 100+ items on Envato Market
+1 more
OurWebMedia says
Even so, it should still be the same steps. Good luck fixing it.

Similar. Just harder to locate what needs to be edited. I did resolve my issues, thank you both for your assistance.

@ Wex – A great way to enter a community. Jumping right in and answering all kinds of questions and offering assistance. It’s a pleasure having you here :) Welcome to TF!

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by