Support » Plugins » WordPress Page Theme Plugin

Viewing 5 replies - 1 through 5 (of 5 total)
  • when i add an ID ($page_theme = get_post_meta(’66’ […]) it works..

    1. how do i get the correct ID into my plugin?
    2. how can i make some of my function only load in frontend?

    thanks a lot
    Jan

    this:

    global $wp_query;
    $postid = $wp_query->post->ID;
    
    if ($postid == '') :
    	echo 'NO-ID, ';
    else :
    	echo get_post_meta($postid, 'page_theme', true) .', ';
    endif;

    returns:
    NO-ID, NO-ID, NO-ID, NO-ID, NO-ID, NO-ID, NO-ID, cuttlefish, cuttlefish,

    I finally made my plugin work.. 🙂
    Code: http://pastebin.com/0qrBE8uh

    BUT:
    When there is no post-meta i just want to return the current theme folder.
    $page_theme = get_current_theme(); returns the whole path.

    How do i only get the current theme folders name?

    esmi

    (@esmi)

    Forum Moderator

    Why not just use get_stylesheet_directory() and work from there?

    Thanks 4 tryin to help, but when i replace line 70 with this:
    $url = get_stylesheet_directory();
    $page_theme = substr( $url, strrpos($url, ‘/’)+1 );

    I get an server error message..

    Internal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Any ideas why?
    Could someone maybe try this plugin on his/her server? 🙂

    EDIT:
    writing $page_theme = ‘twenty_ten’; works.. :S

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘WordPress Page Theme Plugin’ is closed to new replies.