I am currently creating a wordpress site. Some pages will need a section with some images at the bottom and other pages won't. But this needs to be controlled via the backend
So when you go on that specific page in the wordpress backend, there will need to be a check box to decide whether to display the section or not.
It has to be this simple as my client is not tech savvy in the slightest.
Is there a plugin to maybe achieve this?
Thanks in advance
Danny
Install the Advanced Custom Fields plugin. This way you can do a simple conditional along the lines of if(get_field('myCheckbox'){ // add your images };
Further information can be found here: http://www.advancedcustomfields.com/resources/field-types/checkbox/
Update in response to comment
For a radio button, the code should be pretty similar - something like:
$theField = get_field('name_of_radio_button_goes_here');
if($theField == "enabled"){
// THE HTML YOU WANT TO BE HIDDEN/SHOWN GOES HERE
}
No need to add display:none or anything like that - unless "enabled" is selected for the page in Wordpress, then nothing will display for the page you are on
Related
I'm making a website and the client wants to edit titles, contents, img,... directly with the front end view to see the changes. What is the best way to do it ?
I need something like ACF's flexible content to add a section, then a way to edit the acf field with the front end view of the site.
I looked for elementor and gutenberg but i don't know if is it the best solution, i dont want a block editor, i already have my design and the client just need to edit it seeing directly the change.
Thank you for your time :)
This may seem novice, but I assure its not.
So, I have a site, which displays blog posts by date from new backwards.
Standard stuff. However, what I'm trying to do is create a temporary homepage, lets call it 'yogo'. It displays some ad, or image, with a button link.
What I'd like is a direct link to the actual blog feed which displays in a given theme site's frontpage. Is it just a block?
When Im in Appearance->Reading, I can change homepage to 'yogo' fine. But, say a visitor is on 'yogo', and I want a button they click on to link to what would be the original theme frontpage with blog content, it should technically be 'Home' but is that coded somewhere through the wordpress software like the Reading mentioned above.
Maybe Im missing something, should I shut off permalinks, and dig for it in actual page extension?
Im trying to avoid using Guten. or Elem. to build out a blog page.
Any advice, thanks in advance.
Once add your code in front-page.php or home.php you can use get_the_permalink() function to get the blog page URL and will pass in "a" HTML tag like this -
Your Blog Name
Might be it can help you.
Just a quick update. actually solved this.. In simple terms, it is possible to do this really quickly through the Wpress UI. From your backend, these are the steps in the following order:
(firstly. shout out 2 user 'mirchev' because if u didn't point out templates I would of been way off. actually after about an hour of research after that) So it all takes place in Setting->Reading. From what I've read, Wpress started off as a blog based system anyways, so it was solved a long time back. Basically to start, 1. Create 2 pages, no need to add any content as long as they are 'new' and you make note of the names.
2. Also important -in the template area to the right panel when the new page editor loads up (you don't need to add any texts, images or whatever, including the area on the right just make sure "default template" is selected. 3. Afterwards, these 2 pages are 2 be used in the Setting->reading section.
What you want to do is when you enter this setting of your Wpress site, instead of having your "homepage" radio button be "latest posts" set it to 'static page,' and 4. important - select 1 of the 2 new pages you created as the static page. 5. Now, also important, for the posts page, select the 2nd of the 2 new pages you created. 6. Once this is done, what happens is your website loads the static page, which you may customize however, and then you can go into your Appearance->menus and add the appropriate link to the 2nd of the 2 new pages you created to load the blog, or link to it whichever way you choose. More often than not a menu item should appear if that is the setting you customized.
..And that is all. if fact I was very surprised just how smooth it was.
good luck ! ..--'''~~**
Separation!
I am new in wordpress world and i am planning to do a small store website, all the functionalities i need are already there in woocommerce, but there is this small functionality i need which is as below:
in the homepage i need to show 3 different services are served from the company and each service will have a button which will show a popup or redirect the user to another page.
the popup or the new page will ask the user to enter his information along with his mobile number so the company could contact him.
and i have chooses this theme https://themebeez.com/demos/?theme=orchid-store
and here is a picture of where exactly the change will be
So my question is what is the fastest way to do that, is there a plugin to do this for me, or i should make the actual functionality myself and edit the theme code also manually?
Thanks.
In the homepage i need to show 3 different services are served from
the company and each service will have a button which will show a
popup or redirect the user to another page.
Basically 3 buttons that got you to another page. That can be easily done with just editing the template. Look the support documentation to see if your theme can be edited by some page builder (mine uses Composer, etc) and just add the "buttons", if not you need to edit the template manually with some HTML. Nothing to complicated, it just HTML, not PHP or JS.
the popup or the new page will ask the user to enter his information
along with his mobile number so the company could contact him.
Blockquote
Please clarify, popup or a new page? If it is a new page, when you create the 3 buttons on the homepage, just connect that to a new page each (in the Admin Panel, New>>Page). That it is easy as just but the <a href> tag. But also, that's just how I would do it in a short time.
So my question is what is the fastest way to do that, is there a
plugin to do this for me, or i should make the actual functionality
myself and edit the theme code also manually?
Asking for plugins is offtopic in SO, also, where is going to go that data? In the database? or is going to be sent to some admin email? Please see the How to Ask
But I think there is exist a lost of plugins to help you with that. You just need some custom fields so Have you tried searching for some? I use one to get in contact with clients which may fulfill your requirements
I'm making a website in WordPress, and I'm using a plugin ACF PRO. I'm doing the entire site with flexible content, so the WordPress site is like a page builder.
Everything is fine, however, I came to a point where I need to have same functionality for single-[custom-post-type], so I can "Add row", header, footer etc... on it, but I can't figure out on how to do it.
I know that it's possible, because e.g if you look at this site here: https://rolleragency.co.uk/our-projects/
You can see that it works. I know they are using flexible content because I worked on that site and I did there what I wanted. I can't remember how to do that.
I think I had to use a Tempate Page? Or? I can't remember.
THe site is built entirely on flexible content, so everything there is modular and it's like a drag and drop, but how do I do that on single-slug?
You have to create a page template, yes.
So something like page-projects.php then in WordPress admin you would have a page called Projects.
The template you created should be automatically applied to this page. If it doesn't for some reason you can choose which template WP should use on the right side when editing a page.
Now, you can add whatever code you need to the page-projects.php. And also any fields you may need for that page you can set up in ACF by telling ACF to apply those fields to pages that use projects template.
This is how I would and did do it on several occasions :)
I want to add a google maps widget to Pages on a Wordpress site. They all have the same Template with a Sidebar but the map will be unique for each. I feel like there should be a way to populate the widget from the edit page screen for that Page. Does each Page actually need it's own Template?
This seems limiting maybe I'm missing something. If the question is unclear I let me know but I think this should be something ppl have run up against before.
I would suggest the integration of a wordpress plugin to accomplish this. It will be fairly easy to do.
If you want to do this without purchasing any 'pro' versions of a plugin and don't mind writing some simple code, then I would suggest Simple Google Map. You will have to insert a shortcode into the widgetized sidebar area. Here is the plugin link - http://wordpress.org/extend/plugins/simple-google-map/
In order to customize each page's sidebar area, You need to write some code. Please refer to this article which will explain how http://www.wpbeginner.com/wp-themes/display-different-sidebar-for-each-post-and-page-for-wordpress/
It involves a simple alteration of your 'single.php' file and the usage of 'custom fields' so that you will be able to do this from the edit screen of the page, just like you wanted to do!
Use a plain text widget for each map and Widget Logic to select the page it appears on: WordPress › Widget Logic « WordPress Plugins