Tagged Questions
-1
votes
0answers
24 views
get_terms wordpress
I created one PHP class that has a method which is using get_terms() function of word press. Then I am creating the object of that class in other PHP file and calling that method, the method is called ...
1
vote
1answer
24 views
Allow users of my plugin to define their own shortcode rather than use mine?
I'm creating my first plugin. So far everything is great, but my shortcode is something like this [BIMS] and that acronym might not be easy to remember, or appeal to everyone. I'd like to include an ...
0
votes
1answer
19 views
Building a simple “settings” plugin to change textstrings on the home page
I am trying to build a little settings area to change the strings of some text (image urls & links) on the homepage via the dashboard.
I have found a useful tutorial which provides the plugin ...
0
votes
0answers
11 views
Redirect url in plugin to somewhere else?
I am using WP-SNAP Extended! v1.0.0 and I want to use this alphabetical menu as a sub-menu beneath my header. I managed to get the alphabetical menu in place, but now, if I click on a letter, it will ...
0
votes
3answers
22 views
How to trigger $_GET request within admin plugin page?
I have this form in my plugin function:
<form method="get" action="" enctype="multipart/form-data">
<p class="submit">
<input type="hidden" name="do_it_hidden" value="run">
...
-1
votes
0answers
14 views
When adding action or shortcode from inside a class, do I reference it with &$this or $this? [closed]
I have a class, a WP plugin that adds actions and a shortcode. However in tutorials I saw the type of referencing the class with &$this and in some other cases $this.
add_action('init', ...
0
votes
0answers
14 views
Maintain custom post types and taxonomies in all themes [duplicate]
When I change the theme in dashboard, activated plugins that use custom post types, stay in the menu. But my own custom post types that I created myself disappear. Logically, It is because I create ...
0
votes
1answer
34 views
Wordpress plugin with its own “site”/theme
I am currently starting a plugin development project and ideally I'd like the plugin to run using its own custom theme as if it was it's own separate thing.
Is it possible to include a theme within ...
0
votes
0answers
29 views
Get page type to display content
I have some checkboxes to select where can I display my plugin and I save in db in this format:
Show popup in this pages:
x Article (Public)
x Pages (Public)
x File (Public)
x Revisions (Not ...
-1
votes
0answers
20 views
Can someone use my plugin code for their plugin? [closed]
I understand that wordpress works including plugins and themes need to be GPL compliant. If I release a premium paid plugin with GPL license, does that allow someone else to copy my plugin code and ...
0
votes
1answer
41 views
Why is the Settings API is not saving my array of options
I am writing a set of classes to easily create options pages accessible via submenus of the standard WordPress menus and a way to easily create options for said menus. The way I am wiring it is via a ...
1
vote
1answer
37 views
Is it possible to create Custom Post plug-in?
I understand that Wordpress allows you to create Custom Post Types with Custom Fields, but is it possible to create a custom Plug-In that creates and maintains its own Custom Post type (outside of ...
2
votes
1answer
37 views
WordPress plugin installation
I am using the simple add_filter function to output the content.
add_filter('the_content', 'my_name');
function my_name( $content ){
// code
return $content;
}
When I activate the plug-in ...
0
votes
1answer
28 views
Delete data from custom table when deleting a post
I want to delete post id form my custom table, when deleting a post. I have tried this way, nothing happened. Please help.
add_action('delete_post', 'delete_data');
function delete_data($post_id) {
...
0
votes
0answers
16 views
Zend Autoloder.php file missing?
I'm using a Wordpress plugin Zend Framework for wordpress and I'm downloading the actual Zend library to plug it into the plugin (it doesn't provide by itself) from ...
0
votes
0answers
25 views
get_option include <br /> in my adsense
As title said I saved in wp-options -> option_value a adsense code but when I try to display to website in the code I get some
"<script type=\"text/javascript\"><!--<br ...
0
votes
2answers
50 views
Widget redirecting to home page
Am trying to create a widget that searches for names. The searching and all that is fine, but when I hit submit, I get returned to the front page. I tried messing with the action="", but no matter ...
-1
votes
0answers
39 views
Upload image functionality in menu admin
I want to create a custom plugin or function inside functions.php where it allows you to select an image from default Wordpress media library and allocate for each menu. I then want this to be passed ...
0
votes
0answers
42 views
Script timeout when importing/inserting > 45-50 posts from an external table
Wondering if anyone can spot the obvious mistake or give me some guidance on where I'm going wrong.
I should also state this is my first plugin with Wordpress, so I'm sure I have overlooked ...
0
votes
0answers
46 views
Get image URL from media library in input
On wp-admin/post.php?post=447&action=edit for example I have a link and an input.
The link appears as follows:
<a href="#" class="button insert-media add_media" data-editor="tj_image_url" ...
-1
votes
0answers
105 views
Need help to retrive data from MYSQL based on dropdown selection
I am displaying a list of country in the drop down list, retrive it from the database . and i need to display price for the selected country based on the options chosen by the customers in the drop ...
-1
votes
0answers
48 views
Get a wordpress plugin that allows me to ask questions and as the admin answer those questions within a wordpress page [closed]
My name is Scott and I am a life coach. I am looking for a plugin that allows me to ask multiple questions (20 or more) within one wordpress page on my site. Then as the admin I need to be able to ...
3
votes
2answers
106 views
Pass PHP variable to javascript
Is there any possibility to pass some PHP variables in javascript so I can use them later?
Only in single.php.
I heard about wp_enqueue_scripts but with that it is neccesary to declare a path to a JS ...
0
votes
1answer
30 views
Capturing POST data
I am trying to modify the Member Status Plugin so that the status are based on the data saved on a custom database table.
Basically I wanted to change the administration menu with a form that can ...
0
votes
0answers
48 views
PHP file edit ! beginner? [closed]
I am totally newbie to programming and want to edit this timesheet plugin . All I want to do is that make admin approve or reject it . Also add 2 other fields( Note and Comment ) to the list of ...
0
votes
0answers
25 views
attachment_fields_to_edit stopped working in plugin following 3.5 update
Following an upgrade to WP3.5 Elvin, a plugin that duplicates images (by duplicating metadata, not by actually copying the image) stopped working.
The plugin, BDN Duplicate Images, is just one file ...
2
votes
1answer
34 views
Plugin: How should I handle deleting comments?
I am writing a plugin that creates an api for a custom post type.
Users can comments on the custom post types and the comments are added using WP core comment methods.
My question arises when trying ...
1
vote
2answers
37 views
How to change the name of the “edit my profile” link in the WordPress admin backend
I am really confused at this point. I can not figure it out how to rename Edit My Profile link in the admin backend.
How can that be done?
3
votes
1answer
62 views
Finding WordPress sites using my plugins
I've now developed two WordPress plugins and would like to see some sites that use it. I'm looking for a way to find sites that use a WordPress plugin I built.
However, the official guidelines, don't ...
0
votes
0answers
25 views
uninstall.php file in Plugin to clean DB
I am aware that WordPress provides Plugins a nice way to clean up the db if the Plugin is deleted by providing the uninstall.php hook. You just have to place the cleaning code and it works.
But my ...
0
votes
2answers
50 views
How to embed a new string in url?
I am creating a custom tours and travel theme in which I have created custom post type Cities, Locations, Destinations and i am using custom permalink structure. /%category%/%postname%/
So now I want ...
0
votes
1answer
25 views
Wordpress is giving a permissions error on plugin submission [closed]
I'm creating a new plugin (based on a previous plugin I created that works). The options pages show up fine but when I submit I get the "You do not have sufficient permissions to access this page." ...
0
votes
0answers
36 views
Plugin works when all in one file, but I get a strange text overlap output when splitting into two files
I am working on a plugin for myself that will export data from a custom table. The following code snippet creates a menu under "Tools" and lets the user select which fields to export (haven't ...
0
votes
1answer
24 views
How to load plugin static data from cloudfront
I am moving my site's static content data to Amazon S3+ CloudFront and i am successful in doing this for most part of my site (no plugin used) except for the plugin section.
For the plugin i am ...
0
votes
1answer
63 views
wp-load.php redeclares classes
I am trying to load WordPress options within a standalone PHP file. The file is located in /wp-content/plugins/plugin-name/file.php. I have used the following to open wp-load.php:
if ...
0
votes
0answers
50 views
Popup lightbox works in localhost but not in the live site
I created the sample popup plugin. In the code bellow it's working fine in localhost but when I use in the live site it's not working. The code is appear while view using Firebug. But the css is to be ...
1
vote
0answers
38 views
Unable to delete custom post types, confusion around capabilities
So I'm working on a plugin for creating a questions/answers system that's as simple and well-integrated as possible (not unlike this site) but am stuck at the creation of the custom post types.
You ...
0
votes
1answer
59 views
Custom Function for SEO by Yoast plugin
We use a very customized version of WordPress for some of our index/root site pages where we use a custom meta box for custom permalinks. What we are looking for is a custom function that basically ...
0
votes
0answers
52 views
Wysija API - can't find any docs anywhere [closed]
As I mentioned in the title, I can't find anywhere some reference manual about Wysija Newsletters plugin.
On my project, I have some users admin area, so user can login to the site and change there ...
-1
votes
1answer
198 views
How to exclude the particular category from the woocommerce plugin?
add_action( 'pre_get_posts', 'custom_pre_get_posts_query' );
function custom_pre_get_posts_query( $q ) {
if ( ! $q->is_main_query() ) return;
if ( ! $q->is_post_type_archive() ) return;
if ( ! ...
0
votes
0answers
38 views
Wordpress installed under Magento - Php not executed in widgets [closed]
I installed Magento and under a subfolder of magento root (wp), I installed wordpress. Everything works well, excepting that php can't be executed if it's defined in widgets.
I created this shortcode ...
0
votes
1answer
131 views
Different registration form for different roles
I have customised the worpress registration page by adding new fields using the Cimy User Extra Fields plugin so my site is now fine for allowing users to register as contributors.
I now want to ...
4
votes
2answers
93 views
How to read configuration file in wordpress or PHP
I am not sure how relevant this is,i am working with Java based web-application, so in some cases we need to define some properties which can be used in entire web application like
Google API Key
...
1
vote
0answers
21 views
Ordering taxonomies by rank
I'm using a function (copied and modified a bit from this question ) which displays taxonomies in order by rank with ยป between parent and child and | between terms, but I get a mistake in the html ...
0
votes
0answers
33 views
Click Counter Internal
We have the WP Click Info plugin installed that works well on counting visits to external sites. Is it possible to edit this so that it also counts all clicks on audio files within the site? Would ...
1
vote
1answer
15 views
Archive - same title for the first two posts
I created an archive page called archive.php
Here I include header / footer and this code:
<?php if (have_posts()) : while (have_posts()) : ?>
<h1 class="entry-title"><a ...
1
vote
0answers
34 views
How to save the values of checkbox to the register setting?
<?php
function default_menu() {
<form action="options.php" method="post">
<?php settings_fields( 'sample_check' );?>
<input type="checkbox" name="sample" value="nofollow"/>
...
0
votes
1answer
93 views
Query Problem - Show posts within category 'x' that have a custom field between 'y' and 'z'
I'd like to display all posts within a given price range. For example: When a user inputs 100 and 1000 (in two separate form fields) - my site will display all posts that have a custom field called ...
2
votes
1answer
30 views
nonces in custom oop plugin
How to use the check_admin_referer method with oop?
If I use as it follows the function can not be called:
class MyClass{
function __construct(){
if( isset($_POST['my_nonce_field']) ...
0
votes
0answers
28 views
How to rename the core files in WordPress theme programmatically?
Is it possible to create a custom function to rename theme files? For example: footer.php is the file; When I activate a plugin it's renamed to footer1.php, or whatever, when I deactivate the plugin ...

