I have a client that wants to have a custom form added as a page on his Wordpress site. His site is using the "Genesis" framework and is already using a child theme of "Manhattan". I can create the form as a page template from within the Manhattan directory but if they ever update, the changes will be lost. What should I do?
I suggest you make it a plugin with a shortcode that way you can use it on every page you want. And even posts (which don't use templates)
You also could take a look at form plugins, which are fine if you don't need advanced forms.
As long as you place your template inside the Manhattan directory -- assuming you don't place that directory inside of the Genesis directory -- you won't have a problem with over-writing on update of the Genesis theme. Child themes do not have to be inside the parent theme's directory, indeed, they sd not -- they sd be in the /themes directory. See, http://codex.wordpress.org/Child_Themes
it is a very complex form?
If you add a custom template to the existing theme you may loose the changes when the theme is updated.
If is a simple form, I'd use a plugin like contact form 7, or caldera forms.
If not (or you don't wan't to use a wp.org plugin), you can create your own plugin and register a shortcode, you can write all the form functionality at the plugin and use the shortcode in the WP editor.
This way you won't have any risks of loosing features due to a theme upgrade
Related
Long story short - where is the template for the listing list items that are shown when the [jobs] shortcode is used?
I have a WP site with WP Job Manager. I am using the [jobs] shortcode to show a list of the jobs that is searchable. I need to modify the template of the listings to show lets say an excerpt of the job offer. I think the template showing there is the content-job_listing.php, but when I modify it nothing happens. So my problem is I can't seem to find the correct template.
I've searched the whole plugin code and can't seem to find anything remote to what is displayed on my page where the [jobs] shortcode is.
So what is happening here you think and where usually is the template I am looking for?
content-job_listing.php ist the corect template for it. What theme are you using? If you are using a WP Job Manager specific theme like Jobify then they probably have a custom template overriding the plugin's template. Then you'd have to look in their documentation to see which file that is.
Where are you editing the file? In a child theme or in the plugin's folder? If you are editing the file in the plugin's folder and you don't see changes then you probably have the file in a child theme as well. The child theme takes priority in that case.
Anyway you should make changes only in a child theme and not in the plugin files to make sure your changes are update-proof. It could also be that you are editing the file in a child theme which is not the active theme in your WP install?
If you haven't done yet check out the official WPJM documentation on this topic: https://wpjobmanager.com/document/template-overrides/
I'm new to template designs and I'm trying out altering some things in the parent theme from the child theme.
My problem is that there are some files that are not recognized, for example the style.css from the child theme does work for me, but there are other files that I need to load in the child theme instead of the parent theme that I am not able to get them to work.
I am trying to get the /inc/core/shortcodes.php file recognized in the child theme, as there is an html <h4> tag that I want to replace with an <h3>.
The file structure is as follows:
Any help would be appreciated, best regards.
Child theme implementation isn't a universal thing in WordPress - each theme implements it in its own way (some very poorly), and not everything is necessarily overwritable through a child theme. Usually, only actual template files are overwritable. The specific file you're referencing (shortcodes.php) likely contains shortcodes added by the theme, not template data, so wouldn't generally be overwritable in that way.
The better way to handle what I suspect you're trying to accomplish (modifying how a specific shortcode works) would either be to use hooks in the shortcode (assuming the developer added them) to manipulate the shortcode output, or copy the shortcode(s) you want to modify into a file in your child theme, change the name (and function name) of the shortcode, and load it from the functions.php file. This also gets more complicated if you're using a theme with a page builder (Gutenberg, Visual Composer, Elementor, Cornerstone, Avia, Avada, Beaver Builder, etc). Most page builders use some form of shortcode under the hood to actually generate the displayed data. If your theme uses a page builder like this, and the shortcode in question has a corresponding element in the page builder, you'll also have to add a button for your modified version (or insert is using the "HTML" or "Code" element) to actually use it - the existing button wouldn't incorporate your changed code. All of the page builders mentioned above can be (and have been) extended in this way.
I'm very new to WordPress (tbh, it's my first time working with it). And I need to make a website as my school project using CMS. Creating pages with templates is alright, but I have a lot of troubles with buttons. I found this website, and I can see it using WordPress. I need such buttons as on this page https://movie-chooser.co.ua/random-movie-2/ (they appear when you hover over the image). Is this a default option for buttons in WordPress? If not, is there a plugin for this or what is the way to add them on my images?
First Install Elementor plugin https://wordpress.org/plugins/elementor/
and go to page when you add button and open page with elementor
and do drag and drop any element like button, space, text editor etc.
You have several ways to achieve that:
Overwritting Wordpress CSS
Using a plugin
Create your own shortcode
1 - Overwriting Wordpress CSS
If you manage to display all the elements using wordpress template, and your only issue is to display buttons over the images, then it should only be a matter of CSS
2 - Using a plugin
The idea here is to find a plugin that help you to create/display the informations you need (maybe you'll need to add functionnality to basic post though custom fields or using a custom post type).
Once you find the right plugin, again if the plugin dosen't directly offert some settings on the design then you'll have to overwrite the plugin's CSS rules to display the elements as you want.
3 - Create your own shortcode
If you're new to Wordpress I wouldn't recommend this method as it is kind of advanced, unless you're comfortable with PHP/HTML/CSS (optionaly JS).
This is the more flexible solution as you can basically control anything, but it will require you to understand some core concepts of Wordpress like WP Query and how custom queries works.
The idea here is to create a shortcode.
THis shortcode refere to a custom made PHP function, in which you can create a custom request to fetch the informations you need to display from Wordpress database, and display it in an HTML structure that you decide.
THen angain, you'll just have to customize it though CSS.
Note : no need to create a whole plugin if you decide to create a shortcode, you can use the template functions.php file for that.
I would like to create a custom front page in the new Wordpress Gutenberg editor.
In older version of Wordpress I could attach a page to a custom template.
I can't see that option in Gutenberg.
Regards
Frank
The Gutenberg Handbook on wordpress.org says about that:
Planned additions:
Saved and assigned to pages as “page templates”.
Defined in a template.php file or pulled from a custom post type (wp_templates) that is site specific.
As the equivalent of the theme hierarchy.
(https://wordpress.org/gutenberg/handbook/designers-developers/developers/block-api/block-templates/)
So apparently that isn't yet available, but is planned.
Create a new page with wordpress gunteberg editor.
Set it as the front page (on the WordPress settings) and now you can style the whole front page.
You will probably need to install some block plugins to accomplish your needs (sliders, testimonials, carousels, responsive layouts...).
Have a look at getblocklab.com or the ACF block system (in Release Candidate right now available only for premium users) if you want to style your home similar as you would with a php template + css.
i want to convert my html website to the wordpress. But can you please talk me that how i can convert and connect the other pages with the main page???
I'm going to start from the point of view you already have Wordpress and are ready to start.
You can't take your existing HTML website and just add it to WP.
What you need to do is to build your own custom theme, that matches your current HTML files, using the already existing WP templates and files.
Best way is to duplicate an existing theme to play/manipulate so that you don't break WP. The last thing you want to do, having no experience, is to mess with and break the default theme and be unable to get it back again without a full re-install.
RE 'connect the other pages with the main page' WP allows you to have static pages and set them as your home page and/or anywhere else you want. With these pages you can also set up different templates within your theme if you need to.
Wordpress have all this help available here:
Wordpress creating static pages and custom templates
Its not really that simple. You should read about WP theming. Here's the start:
https://codex.wordpress.org/Theme_Development
Check codes from other themes to see how to output basics. Theming has a lot of parts, but to ouput custom html you will need these files:
style.css
functions.php
index.php
single.php
With those you should have an basic blog output with core WP functionality.