Change Field name And Reflacte on wordpress front side - wordpress

I have One Field And Second Field When i Change Data Field one with one name Immedialtly Change Field name Also On Front side Of my site without Refresh.
Describe On Brief
Like Dev tool When We Change Css and effect Immedialty See On Page.
I Need Plugin Like That.
Thank In Advance.
And Sorry For Bad English.

You need to use Ajax calls here.
Make a script that hits in every 3 seconds and under that script make a script code on frontend of the website, which will pick current value from database and show changes according to that on frontend.

Related

How to display visitor's name by just url?

I need help to display website visitor's name (on the popups) by just url?
For example this wordpress website:
https://ngantenstory.id/agus-henny/?u=Jonathan
You can change the name to anything and it will display the exact name on the welcome popups.
No need user database, I assume? No need for the user to register first, etc.
How to do this? Please help.
Thank you.
alert(new URLSearchParams(window.location.search).get("u"))
You can get current page's URL by using window.location,
get it's "search parameter" ("?u=Jonathan"),
and parse it by create an URLSearchParams object,
then get what you want by using get method,
finally use alert or other thing to show it to user.
alert is just for a simple example, don't use it in production, you may want set one of your HTML node's content and style instead.

Wordpress Advanced Custom Fields - Limit A User's Choice To One Option

I have a WordPress website and as part of the news items, the editor can add either an:
internal link OR
external link OR
file
Currently I have this set up as a repeater field with maximum rows set to 1.
Is it possible if say one value has been entered, to prevent another of the values from being filled in.
E.g. I add an internal link and then try to add an external link. A message of some sort is then shown to me to say that only one value can be selected at a time.
I know I can add a description to the field with this information but I want to make it idiot proof so that the user can never add more than one value.
Thanks for your time and help in advance.
I can't write this in comments but celeriko right. Install types plugin there is ability of conditional logic. You can very easy implement of from backend.
Types: http://wp-types.com/
Reagrds

Drupal + Views Slideshowplugin?

I have a question, but the problem is, I can't show the page right now, because it's only on my local server. I will try to explain it as good as possible.
I've got a view that makes my frontpage have the full content of my nodes. So you see a node(in this case an embeded youtube link). You can then go to the next node via "next" or to the previous one via "previous", etc. The problem I have and I don't know how to fix is:
I got a gallery below(another view), of all my nodes, so you can either click through the prev and next buttons, or click on one of the pictures in the "gallery". But when i click on the galery, it goes to the node links so lets say "site.com/node/44".
Is there a way I can go to the node/44 page and still be able to click prev and next? And moreover, can I use the Slideshow plugin by views with changing links? Because it's just says "#" in the url... Like it does with the main content when i click "prev" and "next"?
I hope you can understand what this is about :-). If not, please feel free to ask for further information.
So your explanation is a little "garbly" so here's my somewhat 'not-so-garbly' response:
Sounds like your understanding of views is a little low. Make sure you're Displaying fields in your view and not just full nodes or teasers.
Next, if your desire is to show the gallery on all the nodes of the same type, you can so by creating a block display in views and configuring that block to show up ONLY on the node type you desire.
It gets complicated when you (which appears to be your desire) want the view to start from the last point you were viewing. This will require rewriting the field (this is available via the field configure form) which contains the image. You'll have to add a parameter (probably the current nid) which can be added, hidden, then accessed as a token via the Views Fields interface as well.
I don't remember exactly how to get the view to display the current (or next) slide by default once it's clicked.. but this is probably how I'd do it:
pick up that parameter in JS / JQ and use it to find the slide you want to display... then fire the JS function needed to display the desired slide.

How to load a different front page in drupal if a cookie is set?

I'm trying to figure out how i'd write a module or something so that drupal will show the user 1 front page. If a cookie is set, they see a different one.
So basically, I can't find the following even after googling.
where would I do this? A module? edit the theme file?
How do I show 1 page or another?
I'm using drupal 6 on a linux/apache.
Its unclear if you want to show a different styling or completely a different set of data on the front page in case the cookie is set.
If you want to show a different styling, Create two different template files. You can use theme_preprocess_page function where you can check for the cookie ans set the appropriate template file.
Use api.drupal.org to get the structure of the function. Also use krumo to check in which index of the array(var that goes as an arguement in page_preprocess function) is the template file is being loaded.
Hope this helps!!
I ended up just using PHP in the page_tpl.php
check if cookie is set
if not, load page 2 and set cookie
otherwise show page 1

How to provide a button which will change my current page content to an previous page in drupal

I'm making a site wherein I want to show the current course that I'm gonna teach to my pupils.In this page there should also be links provided to my previous courses. Now when I'm done with this course I want to transfer it to a previous course or rather automatically create a link for it and get the new course content in it's place. I just think doing manually is kind of stupid. Rather I want to have a form where i can create my new course then click on make current course as previous and this course as new whenever i wish.How can I do this.Is this even possible
Pretty open question ... One way would be to work with views when showing a node.
In the view you should use a custom php field, which collects the record (nid) within the course-node table. And then create a link using the drupal path_alias function or by using node/nid ...
You could use panels-module as well. Where you have a view with the latest course, and under the latest course you have a view of a link to the latest course -1 . (I think you can set an offset in views to get the previous course) The view should accept an argument, namely the nid of the currently loaded node.
If you use this method, do check if your panels is giving the arguments to the views module.
Another way would be to use node reference as to what is the previous course (but you don't want it to be manual). The advantage of node_reference is that you don't need to enter your courses in a certain order. If you make it automatically, then the order in which you fill in the courses should be correct.
Easy man. Just create a content type called "course" and using CCK, add all the fields to capture information you want about the course.
Now you have the content. Using Views, create a simple view page displaying course content type and sort it on descending order, set it to display one item at a time and add a mini pager. That way the new course will be the first one displayed and the other ones will be behind it. You might need to customize the pager a bit ^^

Resources