do not reload sidebar.php within single.php - php

In my Wordpress-powered website (http://onomadesign.com/wordpress/identity-design/usx-corporation/ for example) I want the sidebar.php, the thumbnail navigation on the right, NOT to reload when people click another project. So that they not get lost in navigation.
Now, I have looked at iframes, jQuery cookies, 'AHAH-method', php sessions.. but I can't find an easy way to do this.
I am defenitely not a programming expert, could someone give me an easy solution for this?
Thanks a lot in advance!

IFrames or AJAX are the only two options you have. (I suppose unless you did full screen flash) Everything else is going to reload the page. Ahh those other technologies you mentioned do not address the problem of reloading the main page (except iframes)
It isn't really going to be "straight-forward", but what you're trying to do isn't straight forward. I really recommend you take a look at jQuery and how AJAX works, it's probably the better of the options all things considered.

There are a few Wordpress plugins that attempt to implement this functionality. I haven't used any, so I'm not sure if they completely avoid reloading the sidebar, but it's worth a shot. One in particular that seems fairly well scored would be http://ajaxedwp.com/ I found this plugin by going to the "Add New" plugins page in the Wordpress Admin panel and searching for "AJAX Page Load".

Related

Wordpress comments.PHP shows cached version on incognito BUT new version for logged in admin

I've been bumping my head around this for quite a while now. I've added some code to the comments.php function which is loaded on some pages. That code, however, does not work on ALL pages in the incognito browser, but strangely enough, it works on some of them.
When I'm using admin users, it pretty much works on all of them.
What can the problem with this even be?? I've tried flushing cache, disabling it, nothing helps. I'm using Elementor as well if that helps.
If anyone has any idea, I would highly appreciate it, any help is welcome.
UPDATE:
Wordpress sorcery has no bounds. Okay, when I find that certain "post" where I want to see the changes and just click on "Update" button with NO REAL UPDATES DONE in that file, it works and shows up new code from comments.php. But come on, I have tons of those posts, do I really need to "Update" each of them? Is there a smarter way to do this?

Loading another html document within a div?- Advice?

I'm building a site where there will be four tiles on the front page. When a tile is selected, I want the content to pop up in like a window that will be a bit transparent so you can see the main page behind it.
I've successfully coded just that, getting the link to bring up another div that is otherwise hidden and I've even gotten it to load another html document. I accomplished this with XMLHttpRequest();. My question is, is there a more efficient way to do this? I know I've done something similar in PHP before in school and when I google, I do see that being a way to do it, but I'm also seeing jQuery and AJAX being mentioned. My overall goal is to get it to where if I want to update the CSS of the screens, that I only have to do that for the main page, and it affects the content pop-ups.
I hope I explained this well enough. Thank you for any advice!
It's very simple to do in jQuery:
$("#yourDivsId").load("/UrlOfYourIntendedMarkupDelivery?anyarguments=true");

Change the URL also when changing the content of DIV with JQuery?

I want to achieve something like Facebook, where the top bar stays there and only the content underneath it changes for different pages. At the same time the URL at the top also changes, for example /messages or /events.
I'm not completely sure if this is how Facebook works but I'm trying to achieve something like this... Right now I can't figure out how this could be done...
Does anyone know how this could be achieved or if there is a name for it?
You could do this with a fixed header that is on all of your current pages, so that whenever a new page loads it appears the header is still there, or you could do the more complex way of putting all your pages in separate divs on one page, and hiding/showing the appropriate divs when a link is clicked. I'd recommend the first way personally, but those are some options.
I'm sure there are other ways to go about this.
If that isn't what you want then I apologize.
Edit: Also, my first suggestion will load a whole new page, so if you want the seamless transition effect then the second option will be the better route to go
Templates perhaps? You can't change urls without navigating to a different page as far as I know. If you want consistent elements on the page with varying content that basically is the function of templates.
If you're looking for dynamic elements to show up on the page then you should look into AJAX and DOM manipulation. jQuery is the defacto library to help with both of those. Take a look at http://api.jquery.com/ and maybe search for a template engine. Most web frameworks include a template system to create consistent styles and allow code reuse.
You can use #anchors, that won't reload the page. For newer browsers, you can use https://developer.mozilla.org/en-US/docs/Web/Guide/DOM/Manipulating_the_browser_history to update the url without reloading the page

Lightbox in php to show information in pop-up

I'm Developing an application, that have several Pages for the application. And In it i thought to Say one information in it, it the user like to proceed means they can continue or can drop that..
Now i have query like,..
<input type="Button" onclick="window.open(myPage.php)" target="_blank" value="Guess It..!"/>
It opens a new page for showing the Data,.. Its looking good. But just now i came to knew about the Lightbox functionality in PHP with javascript. I Heard that it will perform my process in the Same page without disturbing the Previous one, it came as pop-up and after completing its Process we can close and continue our previous process..
I Hope i will help to my user to work easily without any confusion with the New Tab Open option, now i'm searching for the lightbox Tutorial, anybody suggest me for the Best tutorial or examples..
I think you shuuld look at Fancybox. Good documentation, easy to use, you can dynamic load content, images etc.
There is also tutorial and documentation.
http://fancybox.net/
Download and use this fancy box..This will be easy for you to implement and customize based on reqs.
For using it, refer http://fancybox.net/howto.
Hope it helps.

If the client accepts the plugin, can I know his navigation?

I'm trying to make a page divided in 2 frames. One that shows an external page... a shop for example,and other(mine) that offers related content to what is being shown in the external page.
I've been searching how to know the URL of the frame, but it can't be done due to security reasons(XSS, clickjacking, etc).
But I know it has to be one way to know it. I recently read that some plugins like the facebook's, have the ability to know where the client is while he is navigating.
I hope that my intention is clear. Do you know if this is possible?
Without having the site's owner install some JS on their site, you will find it very hard to find a cross-browser way to do this. FB do have people include a script and this is how they are able to access information cross domain.
You may be able to create plugins to do this, however you will have to create one per browser.

Categories