The tag has no wiki summary.

learn more… | top users | synonyms (1)

1
vote
1answer
124 views

How to access global $wp_meta_boxes variable on front-end?

Is there a way to take the global $wp_meta_boxes variable to be used in the front-end? Currently the $wp_meta_boxes is accessible on specific admin pages only. I've found a similar question about ...
0
votes
1answer
16 views

Settings in functions.php used by a plugin

I'm writing a simple plugin and want some settings in an array in the functions.php file. I'm thinking of adding this in the theme functions.php $test = array('haha' => 'hehe'); my_function( ...
0
votes
1answer
39 views

Access post ID in “content_save_pre”

First time poster, pardon my mistakes. I am trying to use the content_save_pre filter to grab a URL in the first line of a post and save it into a custom meta, and also set the post format as a link. ...
0
votes
1answer
205 views

Passing variables from header.php to template and vice verca

I've defined a variable - let's call it $header_var, which is placed in the header.php file. I would like this variable to be passed onto my template file (in this case taxonomy.php). Also I would ...
0
votes
1answer
87 views

Cannot update custom database table row

I am trying to update a row in a custom database table by $wpdb->update();. In my opinion my code is right but for some reason my database row doesn't update. Can anyone help me with this? I want ...
0
votes
1answer
85 views

Save something to global var in add_filter

I am here again with a strange question. First, I'm using ACF plugin for adding cistom fields. My code looks somethink like that: global $testMe; $testMe = 0; function my_acf_update_value( $value, ...
0
votes
1answer
70 views

key( $GLOBALS['wp_registered_sidebars'] ) is always showing the same value

I am using this code from another answer add_action( 'dynamic_sidebar', 'wpse_96681_hr' ); function wpse_96681_hr( $widget ) { static $counter = 0; // right sidebar in Twenty Ten. Adjust ...
0
votes
0answers
29 views

Using custom fields globally?

I'm trying to use the value of one custom field on multiple pages and posts. I'm a newbie to PHP and custom fields so what I'm trying to accomplish could possible be done using a different method. I ...
0
votes
0answers
64 views

How to load post_meta for custom post type via Ajax

I'm trying to load a YouTube video via ajax outside the loop. I have it working on regular pages, but not anything loaded via ajax. A user would click a button, then a YouTube video will load via ...
0
votes
0answers
35 views

Sessions in plugin development?

I'm developing a plugin. At present I have two files. dotmailer.php and dotmailer-add.php. I'm creating a newsletter widget. My dotmailer.php plugin adds an admin menu, with options. It allows the ...
0
votes
0answers
61 views

Ajax doesn't work on second call

I'm using Ajax to load posts into a sidebar that are filtered by a chosen category. It works perfectly fine the first time, but for some reason the second time it loads a mixture of results from the ...
0
votes
0answers
35 views

Global post is always custom post type last post

my global $post is always taking the object of my custom post type "advertisement". So when i'm editing e.g. "Hello world" which post id is 1, it shows me post id of the last advertisement post. If ...
0
votes
0answers
122 views

global variable not accessable inside functions

I downloaded and installed a wordpress plugin. Everthing works fine on localhost untill i uploaded the site on live server it wasn't working as intended. When i define a variable as global its value ...
0
votes
0answers
73 views

Wordpress $GLOBALS and PHP $GLOBALS

Is the php $GLOBALS associative array over written in WordPress with the WordPress $GLOBALS? I have a piece of code that uses $GLOBALS['myvariablename'] to access a global variable. It works in php, ...
0
votes
0answers
33 views

global vars in wordpress no works fine

I have 2 global vars defined inside funtions.php global $ruta_path; global $ruta_db; I want send the value of this global values to function in comments but no get works Inside comments.php i have ...