Dr.Hariri
  • Member for 8 years
  • Last seen more than a week ago
1 answers
0 votes
258 views
List Custom Post Types in Admin Dashboard
Accepted answer
1 votes

The following code lists all registered WP custom post types (only to admins) as an admin dashboard widget. Remember to enable the "Wordpress Custom Post Types" widget if it's hidden. By default, the ...

View answer
2 answers
1 votes
700 views
Wordpress after content Hook & external template part
Accepted answer
1 votes

Ok since get_template_part and require couldn't be used since they echoed the content above the content and not below (Thanks @benoti), I decided to use a different approach: ob_start(); ?> <? ...

View answer
1 answers
0 votes
442 views
Editor meta box Showing but not saving
1 votes

The problem was with this line: if(!$related_resources OR $related_resources == '') return; I changed it to: if($related_resources == '') return; And it started working properly. I hope others ...

View answer
2 answers
0 votes
915 views
Auto-change Post Status on First Page Load
Accepted answer
0 votes

After many tests, it seems that this code is working. Please suggest improvements if you have any! I have tested this but I need to test it more thoroughly: function educadme_assigned_to_inprogress() ...

View answer
1 answers
0 votes
29 views
How to Show Different Information to your authors/contributers
Accepted answer
0 votes

We will use the admin_notices hook to display the information on top of the editor. First, a very basic example function educadme_fill_then_save_admin_notice(){ global $pagenow; if ( $...

View answer
1 answers
0 votes
32 views
User's Comments Number: Storing it in a meta field for different uses
Accepted answer
0 votes

I am using this within a plugin, but it can be used within your theme's function file. // Create field to track users' comments numbers function ...

View answer
1 answers
0 votes
974 views
Dynamically Generating User Meta Field
Accepted answer
0 votes

After some help with a PHP developer, it seems the main code above was close but certain changes were made. Here is the code for those interested. In this code, the custom post type is: Course. Change ...

View answer
2 answers
0 votes
909 views
How to access User meta data within a plugin
-1 votes

Try adding this to the top of the plugin file and re-test: require (ABSPATH . WPINC . '/pluggable.php');

View answer