Add options to wordpress gallery function - wordpress

Is it possible to add custom options (checkboxes and selectfields) to the default gallery settings in wordpress and then query them as parameters in the code?
Examples or links to corresponding tutorials would be great :)

See if advancedcustomfields helps you. This allows you to create additional option fields. But then you would have to deal with the plugin yourself.
But if you do a lot with WordPress and with WordPress programming you can generally recommend advancedcustomfields anyway.

Related

Best way to develop WordPress site filled with pages like this

I got designs for pages that all look pretty much like this:
page mixed with editable text/photos and custom post types loops
What is the best way to develop theme like this? Let's say client ic complete noob when it comes to HTML/CSS (and even WordPress, which he demands)
The best way to develop themes like this is using Bootstrap + WP Theme Development together.
https://codex.wordpress.org/Theme_Development
http://getbootstrap.com/docs/4.0/layout/overview/
If you want to have fragments like jobs or article list within the content you can add this functionality by shortcodes - https://codex.wordpress.org/Shortcode_API. Let me know if you need example ( like post or job listing with shortcode ) ?
If you can do some custom page template development for the Wordpress Theme I would highly recommend using Advanced Custom Fields Pro to handle the content entry. It costs $$ but is well worth it. I use this plugin for most of my Wordpress development.
Specifically, I would recommend the ACF Flexible Content field to make the kind of layout in your screenshot. You can code up template parts for each "Layout" and then the user can construct a page with any of the layouts you have configured in any order they want.

Writing a wordpress plugin: add_meta_box vs. add_settings_field?

I'm writing a custom wordpress plugin and trying to incorporate some functionality from a third-party plugin. That plugin seems to use add_meta_box to create the fields for settings options on the plugin admin pages. I searched the entire source code of the plugin for add_settings_field and it doesn't occur once. Are the two functions basically interchangeable? From the WP Codex, it seems that add_meta_box is primarily for the purpose of adding "a custom section to the post and page editing screens" -- i.e. not so much intended for the admin settings/options forms. On the other hand, the 3rd-party plugin seems to work very well, which is why I'm borrowing from it...
So in short my question is this: can someone please explain correct usage for the add_meta_box and add_settings_field functions? Thanks! Please let me know if anything about this question is unclear and I will do my best to rephrase.
This is a settings field (Slug):
This is 2 Meta Boxes (publish and categories):

Add custom HTML to WP Post based on custom field using plugin

The wordpress plugin I'm developing needs to be able to display some custom HTML in posts. I know that this is possible with shortcodes, but unfortunately I'm limited to using 'custom fields'. In order to deside which HTML should be added, the authors set a custom field (using a post-meta-box in the backend created by the plugin).
But I can't find any documention on how to achieve this. It's easy if you edit the wordpress theme, but this plugin should work across different themes.
Anyone able to guide me in the right direction? Thanks!

WordPress plug-in customization approach

I understanding we may not have a plug-in that would fit in to our requirements in all respects. I am planning to use theme-my-login plug-in. However, it requires fair amount of customization in terms of adding more/custom fields for registering into site. There are some page redirections that I had to insert conditionally.
Can I tweak the code with-in plug-in files?
Should I be extending this through themes files/folders, withough tweaking in the plug-in file structure?
Thanks in advance
It all depends on what you want to change / add, and what the target plugin allows you to do. In general, you can customise some of what other plugins are doing by making use of available filters, actions, CSS, templates, and brute-force WordPress filter/action hooks if that's appropriate.
The Theme My Login, which you reference, presents its various views through templates that you can override either by dropping a customised copy of its template into your theme, or through a filter "tml_template". If what you want to change is the appearance, then you have lots of control through those two avenues. I notice that the plugin has various other filters you can hook, allowing you to customise many aspects of the plugin.
I suggest you start off by reading the plugin's FAQ which points you in the right directions already.
You can tweak the code with anything in Wordpress, but with caution.
If you are customizing wordpress themes, when the themes are updated by wordpress, any customizations are lost.
That is why Child themes are created.
You may find this link useful:
http://codex.wordpress.org/Child_Themes
I suggest creating a new plug in based on the customized code of the Wordpress plug in.
You may find this link helpful. It discusses Wordpress plugins and how to create them.
https://codex.wordpress.org/Writing_a_Plugin

Yoast SEO and custom fields

I was wondering if it was possible to use the advanced custom fields - wysiwyg editor as the default editor for the main content and let yoast read that instead of the default?
Or if that isn't possible then if it is somehow possible to dublicate the content from acf to the main editor.
Or if there is any other way please help.
Thanks
This answer is a bit slow in coming, but we had the same exact question and decided to build a plugin to do this:
http://wordpress.org/plugins/ns-seo-custom-fields/
We just released it and found others looking for a solution like this question and hope that it's helpful to the great WP community.
There are a couple of solutions you can work with.
If you search for Yoast and ACF on the plugin directory you can find the one you like best: https://wordpress.org/plugins/search.php?q=yoast+ACF
We have a plugin of our own: https://wordpress.org/plugins/yoast-seo-acf-analysis/
Which is open source, so if you find any problems or think of enhancements you can create an issue at the github project: https://github.com/Yoast/yoast-acf-analysis
Hope this helps you.
Jip from Yoast

Resources