• This is what I want –

    After clicking a Post in the list, it should auto scroll down to reveal the first half of it along with the heading. Right now only the Post heading is being displayed at the bottom, after clicking a Post.

    It’s certainly not user-friendly to repeatedly scroll down manually to view the rest of the post.

    Just in case it matters, let me give you some additional info:

    1 – We are working on a Multisite environment having more than 300 sites.
    2 – We are using the Archy theme for most of our sites.

Viewing 6 replies - 16 through 21 (of 21 total)
  • Thread Starter rajesh0228

    (@rajesh0228)

    Chad, what if sidebar.php does not exist?

    I recently found out that the theme “blue_fitness” does not have it?
    What next?

    I just remembered that you’d mentioned this: “but you could modify content.php (pereferably with a child theme) to link to an anchor that would put your title at the top. perhaps #wrapper? Line 23 ought to be the one to change. “

    Is content.php an alternative to sidebar.php?

    Chad

    (@lynneandchad)

    Unfortunately this won’t be a one-size-fits all type of solution. The code I gave you was specifically based off of the sidebar widget on the Archy theme you were using.

    If you’re going to want to do this on many different themes, you’ll have to adapt the solution to different situations.

    Your first step will be learning about the template hierarchy.

    Once you’ve learned how to determine which files are generating the links you need to change, you’ll need to look at the structure of the theme and adapt the code accordingly.

    content.php and sidebar.php are very different files. It all depends on where the links you want to change are being displayed, and how the styling of your theme is set up.

    I’m not familiar with the theme you mentioned, so I’m not sure where the links are, or how they are styled.

    PS, yes I get emails of your posts. There’s a “Subscribe” link on the right of this page, or you can check the “Notify me of follow-up posts via email” box below when submitting a comment.

    Thread Starter rajesh0228

    (@rajesh0228)

    I checked the Template Hierarchy, esp. the Visual Overview.

    I must admit it looks confusing to me. May take some time to get the hang of it.

    But since I am dealing with Post links, do I need to be concerned only with the Post-related boxes in the Visual Overview? I mean for my solution from where do I start for a given theme – to zoom in on the right php and then insert the code you’d given in that file?

    Chad, since I am new to all this I just wanted to pick your brain so that I can, at least, know the beginning of the road map, so to speak.

    PS: I’ve checked Notify me of follow-up posts via email and also Subscribed, as well as, checked my spam filter, but still I am not getting any email notifications of your posts. Very strange!

    Chad

    (@lynneandchad)

    I’m always up for a little brain-picking. ??

    The problem with trying to do something like this from one theme to another is that it impacts where you would start looking. For example, on the site you originally posted about you were trying to fix an issue with the sidebar.

    On another site you might have posts listed in the content area, meaning you need to fix the links being generated in a file like home.php, index.php, or a more specific file like content.php or loop.php – or some other options.

    In that example, the code I gave you wouldn’t be much help at all, as it replicates a sidebar widget.

    The template hierarchy may seem like a lot to take in for what seems like a simple problem, but going from theme to theme is going to make it necessary – I’m afraid that’s where your road map begins ??

    Once you get a handle on how to find the code to change for a given theme, the important part is identifying the anchor and adding it to the end of the the permalink like we did in the example above.

    Thread Starter rajesh0228

    (@rajesh0228)

    Ok Chad, thanks for your all the helpful answers you’ve given.

    Now it is up to me to understand Template Hierarchy and zoom in unto the required file.

    But wait!

    I need one more help from you. Can you please solve this Multisite problem?

    Chad

    (@lynneandchad)

    No problem. Just visited the other thread.

Viewing 6 replies - 16 through 21 (of 21 total)
  • The topic ‘Automatically scroll down Post’ is closed to new replies.