Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Magnus P White

    (@magnuspwhite)

    This plugin has been updated and now work properly with every HTML tag.

    Plugin Author Magnus P White

    (@magnuspwhite)

    Sorry about this problem. The reason why the resize does not work on your site is because the fonts are specified as pixels.

    We are currently working in changing these to allow it to properly work on pixels, em and percentage.

    Regards,

    Magnus

    Thread Starter Magnus P White

    (@magnuspwhite)

    Thanks guys that really helped. I used add_action('the_post', 'add_toolbar'); to load the function at the beginning of the post to allow be to use get_the_ID();

    I then posted JS in the footer rather than the header as the header had already been loaded.

    Thanks again for the help!

    P.S. If you were wondering what it was for here is my plugin (http://wordpress.org/extend/plugins/atbar/). It is an accessibility toolbar (ATbar).

    Thread Starter Magnus P White

    (@magnuspwhite)

    Thank you for confirming that.

    I am trying to get the page ID in my plugin. I seem unable to access the the_ID() function whether I set global $wp_query; or not.

    I have tried a number of methods suggested on different wordpress pages but cannot get a definitive answer.

    I use “pretty” permalinks and am told that ‘the_ID();’ does not work with them. A solution suggested was:

    global $wp_query;
    $page_object = $wp_query->get_queried_object();
    $page_id     = $wp_query->get_queried_object_id();

    I got the error:
    Fatal error: Call to a member function get_queried_object() on a non-object in /var/www/...

    Further I have tried the following for inside and outside of the loop, respectively:

    function function_name() {
    global $post;
    $thePostID = $post->ID;
    }
    
    function function_name() {
    global $wp_query;
    $thePostID = $wp_query->post->ID;
    }

    Please can anyone help or provide a reason as to why there is an issue. Alternatively, how to get the page id under any circumstance when called from a plugin function.

    Many thanks.

Viewing 4 replies - 1 through 4 (of 4 total)