WordPress Left Navigation - wordpress

This may be an odd question. I'm working on a website someone else built in WordPress. My understanding of the left navigation within the dashboard is that there are some default items that are there upon install like [pages], [posts], [plugins], and to get additional items to show up here you need to install a new plugin.
This site I'm working on has a few options in the left navigation [team members], [services] which do not appear to be tied to any particular 3rd party plugin.
In fact, it looks like they've used the plugin "Advanced Custom Fields" to create their own functionality so their users could easily add/remove team members from a custom built slider.
My Question
How do you get your own tab to show up in the dashboard's left navigation? Can you do this within a child theme, or do you need to modify the core WP files? Is there a particular folder or some documentation anyone could direct me to where I might learn more about how this is being connected behind the scenes?
Thank you kindly in advance.

I'll preface this by saying:
Never ever ever modify Core Files!
Whew! Now that that's out of the way, there may be a few plugins that do this for you, but I'm ultimately unfamiliar with any. The typical way to add Admin Items is with the add_menu_page() and add_submenu_page() functions. They're relatively straight forward to use.
Also, as a side note, when you add a Custom Post Type with register_post_type() (like what ACF does) there are options to add it to the menu, as well as what you want the labels and menu names to be.
If you're adding a Custom Post Type (like Team Members, Books, etc.) you'll almost certainly want to make use of the labels and show_in_menu arguments when you call register_post_type() to get the admin menu to show up. However, if you need to link to arbitrary URLs or custom dashboard pages, you'll want to make use of the add_menu/submenu_page functions above.
For instance, here's a simple snippet that will add a Stack Overflow link to the menu, you can drop this into a child theme, plugin, Must-Use plugin, etc:
function stack_overflow_admin_link(){
echo '<script>window.location.href = 'https://stackoverflow.com'; </script>';
}
add_menu_page( 'Stack Overflow', 'Stack Overflow', 'subscriber', 'stack-overflow', 'stack_overflow_admin_link', 'dashicons-external' );
Hope this helps!
Also I'll elaborate a little bit on my warning! Never ever modify core WordPress files. They will be overwritten with each and every WordPress update. WordPress is relatively well thought out and has countless Action Hooks and Filters that let you inject, modify, remove, and otherwise manipulate data and the user experience without ever touching core files.
As an example, take a look at this screenshot:
I'm currently rebuilding a software suite from the ground-up using WordPress, but the standard WP Admin interface doesn't make sense in many of the contexts we need it, so our interface (a work in progress) looks like this, and it's all handled by a Must-Use plugin and touches absolutely no core files, it just uses clever manipulation of the hooks and filters available throughout WordPress

Related

Hide few wordpress dashboard option from client

I have just developed a wordpress site for a client. The client wants full access but I dont want to give him access to all the work which I have done (plugins, techniques, themes options etc). How can I give a customized dashboard access to the client with hidden plugins and theme menu items.
Thanks
If you want GUI based approach and not want to handle it via functions, using the Members plugin could help
I think you would prefer to go with a plugin rather than pieces of code. You can achieve the same by using a plugin called Adminimize
Admins can activate/deactivate every part of the menu and even parts of the sub-menu. Meta fields can be administered separately for posts and pages. Certain parts of the write menu can be deactivated separately for admins or non-admins. The header of the backend is minimized and optimized to give you more space and the structure of the menu gets changed to make it more logical – this can all be done per user so each role and their resulting users can have his own settings.
I hope the above information worked for you.

How to create Child Plugin for wordpress

Actually I have changed some code in WordPress Store Locator. I want it to remain when plugin will update. So I want to create a child plugin for that. Any ideas on how I could manage it?
This varies plugin to plugin, and it sometimes isn't even possible, other times plugins have documentation to extend them easily (such as WooCommerce and Gravity Forms). Some of them create Action Hooks with do_action() that let you extend the functionality easily. A common example is updating a post after a Gravity Form is submitted with their gform_after_submission hook.
Effectively, it depends on what you want to do, and how the plugin implements the functionality you want to change. If they add text with a Closure or Anonymous Function, it will be harder to modify said text, and you may have to look at something strange like doing a run-time find and replace using Output Buffering, typically on the template_redirect hook.
If you want to remove something a plugin does, you can often unhook it with remove_action. This can be a bit tricky depending on how the plugin is instantiated, sometimes its as simple as:
remove_action( 'some_hook', 'function_to_remove' );
Other times it's more complicated like:
global $plugin_class_var;
remove_action( 'some_hook', array($plugin_class_var, 'function_to_remove') );
Those are the basics of extending (or even 'shrinking'?) a plugin's functionality, and it's not always doable appropriately. Unfortunately the narrow answer to your question is outside of the scope of what we can provide from StackOverflow.
From here, you'll need to figure out exactly what you want to do with the plugin, and dig through the plugin's files to see if there's an appropriate hook or function you can use. If you're still stuck, you'll need to post a new question (don't update this one) with your exact desired result and anything you've tried, and the relevant code that goes along with it. "I want to change a plugin without editing core files" isn't nearly specific enough. "I want to replace an icon with a custom icon in this plugin, here's what I've tried" is specific enough to possibly answer.
Good luck!
I just went through myself and I had so many changes that I couldn't just override the actions.
I created this tool that allows you to create a child plugin like a child theme. You can make updates to the plugin and still update it without losing your changes.
I'm posting this here because it relates and hopefully becomes useful to the next person who runs into this issue.
https://github.com/ThomasDepole/wordpress-child-plugin-tool
As per WordPress standard, it's called plugin's addon.
if the plugin has provided any action to update that functionality then you can use it with your addon (child plugin).
Here I am sending a link for reference.
https://developer.wordpress.org/reference/functions/add_action/

Drupal: How to override Advanced Forum topic list for one specific forum term

I'm using Drupal 7, and have the Advanced Forum module installed.
However, I want to show some Ubercart products in one section of the forum, called the Marketplace to make them more visible, and since users will be able to add their own products.
However, obviously in this section I want to show the forum topic list differently, including the price and other such fields.
Is there an easy way that I'd be able to do this, perhaps using Views? I'm really at a loss for what to do.
You should be able to just create a new View with a page display that displays things like you want them and then set the URL for the view to be the URL that is currently being used for the forum listing you want to override, so that the links to it still work without any additional work.
First of all, you should override the page template for one specific term by creating a new page like so:
page__forum_TERMID
To go more into details about what you need to show in this custom page, you may need to install the Devel & Theme Developer modules.
With Theme developer you will be able to inspect your Drupal output on various parts of the page in order to find out either which preprocess function or which template it originates from.
With Devel you will be able to output some of the variables you may need to act upon in order to generate your custom layout.
I would advise you to look at the implementation of the [Advanced Forum More Styles](http://drupal.org/project/advanced_forum_more_styles) in order to see how you could create your own Advanced Forum Style, which basically means a folder where you can store the various custom templates that will override the Advanced Forum templates.
Recently, I did something similar to what you're looking to achieve, I created a custom module to hold the various preprocess functions and that module contained a styles folder which was declared like so:
function YOURMODULENAME_ctools_plugin_directory($module, $plugin) {
if ($module == 'advanced_forum') {
return 'styles';
}
}
If you look at the styles in the AF module, you will see that they only override a few templates, so you may have to find the template you're looking for in the base style such as the "Naked" style.

WordPress Plugin Development Idea? Is this possible? Am I on the right track?

I'm very new to WP development. I host a website which needs a list of trails (hiking, biking, etc) and I'd like to write a WordPress plugin to do it.
Can someone please tell me if I'm taking the right approach, and if what I'm proposing is possible.
I'd like the site to end up with an auto-generated and filtered index at http://example.com/trail-guide, and the discrete trail info pages at http://example.com/trail-guide/trailname. This data would all be stored in a single database table holding info for each trail, with an admin page for adding, editing, and deleting entries from here.
Is a WP plugin the best way to go about doing this, or should I be looking at something else?
From the way you're describing, your best bet would be to Register A Custom Post Type. This can be done by adding to your existing theme's Functions.php file, or by creating a plugin.
If you don't plan on changing themes, my advice would be to just hardcode everything into your functions.php file. Otherwise, creating a plugin for this particular job would be the safest alternative.
Using this functionality in tandem with Custom Meta Boxes and Custom Taxonomies will allow you to keep everything organized within the Wordpress Framework with your own special data.
This means that these new posts can also be queried at any time through the standard Wordpress Loop or search box.
If you are uncomfortable with writing your own functions to extend your existing framework, you might want to look into some plugins like GD Custom Posts And Taxonomies Tools to manage your own.
Hope this helps.

Porting Wordpress widget plugin to Blogger gadget: admin interface, global settings?

I'm attempting to port a Wordpress widget plugin to a Blogger gadget, and finding them extremely different worlds. What the WP widget does is:
In the admin interface (provided by the widget object's form() method), it displays a list of the posts in the blog for the blog owner to select from, saving this as a widget setting.
In the widget display (provided by the widget object's widget() method), it displays some content linked to the post that was selected.
This seems to be bizarrely difficult behavior to replicate in a Google Gadget. The questions I wind up having are:
As far as I can tell, Blogger barely has a concept of an admin interface, and certainly none that would manage widgets. It seems like I need to deploy admin and user functionality through the same gadget display; am I correct about this?
I can get at a list of blog posts easily enough, but how in the world do I create a setting that's global to the widget instance instead of specific to the user viewing it? I get the vague impression that that may be possible through OpenSocial in some way, but damned if I can figure out how.
Have you already checked the links: https://developers.google.com/blogger/docs/gadgets/gadgets_for_blogger and https://developers.google.com/gadgets/docs/basic ?
They should have enough info for the item no 1.
Please note: With recent addition of dynamic views it seems like you need to hack stuff in order to make your gadget work when dynamic views are enabled (see this article). Perhaps they'll improve that in the future but the last blogger gadget announcement related to dynamic views was in feb 2012 dynamic-views-update-3-gadgets.
For the item no 2, I am not sure either. Maybe they'll add that in the future.

Resources