All Questions
170 questions
1
vote
1
answer
400
views
Wordpress get_avatar function not correct working
My code doing this, listing which author have posted in the current category. But get_avatar function not correct working. Im Using Simple Local Avatar Plugin. It is working author.php don't have any ...
0
votes
1
answer
527
views
Adding a Tag Parameter / Filter to My Shortcode
I have this plugin that displays category featured image thumbnails for each post via shortcodes.. like so,
[categorythumbnaillist 3] (3 being the category of course)
I would like it to only show ...
2
votes
1
answer
259
views
New Plugin: Post update pushes a copy as a revision
I've been working alot with editing of posts after they've been published. I know I can hit update on the post to just update it, but I want to have the journey of revisions available for users to ...
0
votes
1
answer
473
views
JQuery prepend a function
I am trying to see where I went wrong with this code. I was trying to prepend the avatar and user meta above the admin menu. I get header already sent messages as well since the code is just right ...
0
votes
1
answer
3k
views
More gentle way to hook Wordpress custom url
I have written a plugin named foo, and I want when user typed url /hello and it will display the string world
There is an existing post which uses the following code
if ($_SERVER["REQUEST_URI"] == '/...
1
vote
1
answer
1k
views
Date calculations from 2 custom fields
We are struggling to find a way to calculate a time difference between two dates saved as custom fields on WP. We are actually using two different plugins:
a) Easy Content Types
b) Advanced post ...
0
votes
2
answers
227
views
Including a PHP file via a function that is part of a plugin?
I struggled with this all day, and now am here...
I have a contact form generated by including a php. Presently, I have this code in my theme's index.php to include it:
if ( is_page('contact') ) {
...
11
votes
4
answers
32k
views
How do I call wp_get_current_user() in a plugin when plugins are loaded before pluggable.php?
The current result is "PHP Fatal error: Call to undefined function wp_get_current_user()" which makes sense, but doesn't help.
I need to use $current_user.
Here is the code I'm currently using:
$...
0
votes
1
answer
331
views
Load Javascript from Plugin in One Page Only?
I use the ALO EasyMail Newsletter.
But the plugin is loading lots of Javascript in the head.
I have a mobile site and the scripts are loading in all the pages. I think this affects the mobile ...
0
votes
1
answer
1k
views
Why can't I call a (member) function from within a foreach?
I'm working with a plugin called media tags...
The foreach looks as following (simplied as much as possible)
foreach($mediatags as $mediatag){
$args = 'media_tags=animals&numberposts=10&...
0
votes
1
answer
732
views
How to add custom function to pluggable.php
I am working on a WP plugin and I want to add a custom function to pluggable.php (located in /wp-includes). I am calling that function from admin.php (located in /wp-admin)
eg. Consider the function ...
0
votes
1
answer
336
views
Showing author box on post detail page
Being new to word-press as well php i am struck at a point.
I am trying to display author information along with his picture in the post and have successfully able to fetch all the data from gravatar....
0
votes
1
answer
573
views
Can you echo PHP code from a variable?
Ok this is a stupid question, and I'm not sure I even asked it right, but this is what I'm trying to do.
My wordpress theme supports ad placements and I want to use a advertising manager plugin.
I ...
-1
votes
1
answer
1k
views
Adminimize Plugin -- Is there an alternative to limiting Editor to 'Appearance > Widgets' only?
Adminimize > Menu Options: I want to grant access to "Appearance > Widgets" only to select users (but not Themes, Editor, Add New Themes; nor Plugins, Settings). Although I have selected this in the ...
4
votes
5
answers
29k
views
if plugin is active? check if plugin is enabled or not?
I'm using the mingle plugin and the mingle-forum plugin.
I want to show a certain part on my site only if those two plugins are active. How can I solve this?
<?php if ( is_plugin_active('mingle-...
0
votes
2
answers
4k
views
Are there action hooks for comments?
This is for a personal-use plugin I'm trying to make. I want to submit a comment from site A to my blog (sort of like sending trackbacks/pingbacks but a full comment).
For instance, on site A I have ...
0
votes
1
answer
524
views
Help with WP Business Directory Manager Plugin?
I'm using the WP Business Directory Manager plugin and I'm having some problems. The developer hasn't been supporting the plugin lately, so here I am.
I need to change the field order. Currently the ...
0
votes
2
answers
581
views
Check if variable is set in filter
Thanks to your suggestions, I enabled wp_debug and discovered flaws with my plugin. I have a filter for sorting posts by votes. I use it when the sort URL parameter is on.
add_filter( 'posts_where', ...
1
vote
1
answer
2k
views
Missing argument 3 for wp_register_sidebar_widget()
I installed the Deprecated Calls plugin and it's telling me to change register_sidebar_widget() and register_widget_control(), essentially add wp_ first.
I did but I'm getting Missing argument 3 for ...
1
vote
1
answer
3k
views
add_query_arg not working
I added a filter to append a parameter onto the URL when navigating in categories. This is used to sort posts by their votes when browsing a category only if a sort parameter is set.
For instance ...