Wordpress use theme button and add php POST data [closed] - php

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I have a Wordpress site with Avada theme using Fusion Builder. I've added a button using Fusion Builder and there is a list of settings for that button, e.g. color, url, alignment etc. Currently i've set the url to load "page.php". So if the user clicks on it, they are taken to"page.php".
But I also have a dropdown next to the button, and i want to POST the selected e.g. Australia
Since the button has been built for me I dont know how to add the POST variables to the url so i can get something like:
page.php?selected_option="Australia"
i.e. how do i edit the button HTML and script?
Along with "url, color and alignment" there is another button option "give id to wrapping element". I've put "my_search_button". Now the page source is showing this:
<a id="my_search_button" ...><span class='fusion_button_text">Search</span></a>. However for what I'm trying to do this doesn't seem like good practice

Please check Proper Documentation for it all answers are in it
https://theme-fusion.com/support/documentation/avada-documentation/

Related

Why the carousel doesn't automatically change - PHP [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I've created simple page where you can add images to database. Here is my code, where i pull images to website:
enter image description here
in DevTools i can see that all images are pulled correctly:
enter image description here
But when i click next/previous
website is reloading, but picture is still the same, and URL is changed:
enter image description here
Do you have any idea why?
I even add JS script to add intervals to this carousel but it's still doesn't work.
Thank you
It seems the problem about javascript library. it is not loading. You need to add full code to test it.

Creating dynamic bootstrap modals with php mysql and ajax [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
so I am working on a small ecommerce site and I've been stuck on this section of my site for quite a while now and can't really wrap my head around it.
I have divided the site into 3 columns with bootstrap's grid system, in the main section I have my featured products, however, I'd like everything to be dynamic, when I click on a modal with "View details" for the product the only code that works is the dynamic one, I'd like to know how to make it so that it pulls the data directly from my database, unfortunately out of frustration I deleted the little work I had done on it and can't show stick it on here so that anyone can correct it for me.
Could anyone please help me out?
Thanks!
There are many ways you could go about doing this. Here is an approach you could use:
Get the id from data attribute of your product (make sure you load it into the html).
Send a $.get request with jquery for this id to the server.
Get the data needed from the db using this id.
Render the data server side
Return html
In the callback function of your get request put the HTML into your bootstrap modal body.
Show the modal to the user.

How to get ID from URL in WordPress [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I have programming experience from PHP but now I am creating a WordPress theme which is a bit mixture.I have a blog which contains posts , when a user click on a post i want to show the clicked ID content in the other page , i am new to wordpress i want to show the details of my each post in the details page.How can i do that ?
Homepage: Contains a loop for displaying all posts
Now i want a page which display each post separately when a user click any post from homepage.
May be steps below should do it
Make receive.php as template, add <?php /* Template Name: theTemplateName */ ?> at the beginning of template file.
Create a page, give it a slug, let say the-receiver, make sure you select theTemplateName as its template.
Now, create a form inside single.php, give an (hidden) input with value from get_the_ID(), set it POST/GET whatever suits you, and the action to site_url('/the-receiver'), match the url to the slug the page that is using your receiver template name. Watch now button should submit the form.
Inside the file/template receiver.php, do your stuff.

How can users post after posts of others? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I want to display an add comment button(like in here or FaceBook) for all of the users' posts.
As you can see in here, if you click "add comment" button, small input box opens and your comment appears right below where you add it with smaller size than normal posts.
I am confused about which language would be the best for this. I know a little about JavaScript and jquery but i think doing it with php is not possible. An idea or example to do that would be greatly helpful.
JavaScript shows the form field, than makes an Ajax call to the server when the person clicks the add content button.
The server saves the content to the database, and returns a success message.
If successful, the JavaScript shows the comment and hides the form fields.
JavaScript and jquery its a client side technologies. Php is a server side. You need a proper database design and can choose any sever technology you like.

Facebook like button: How do I prevent people accidently "unliking" my page? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I want to prevent users the ability to unlike my page having clicked they like it because I have it prominently displayed next to my site's header. I am afraid that people will accidentally "unlike" my page having already clicked it once to like it.
So far I have explored a php proxy so I can use a custom css page. Anyone else have any ideas? What about a non-iframe facebook like button?
well, preventing from double click might be hard,
but after your page loaded you can get the text the inside of fb like box element, learn the id via firebug) if it is 'liked', you can hide the box..
of course you can do this only for fbml, not for iframe.
otherwise, you can't!
i suggest you to check other likebox styles. http://developers.facebook.com/docs/reference/plugins/like-box

Categories