Jan K.
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: problem moving submenu item to toplevel item in admin menuForum: Plugins
In reply to: wpmu_create_blog() => Call to a member function init() on a non-object$wp_rewrite = new wp_rewrite(); solves the problem..
Forum: Plugins
In reply to: wpmu_create_blog() => Call to a member function init() on a non-objectupgrade.php lines 291 – 293
if ( is_multisite() ) { // Flush rules to pick up the new page. $wp_rewrite->init();
I’ve already written global $wp_rewrite; but it has no effect.. :S
Any ideas?
Forum: Plugins
In reply to: WordPress Page Theme PluginThanks 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.. :SForum: Plugins
In reply to: WordPress Page Theme PluginI finally made my plugin work.. ??
Code: https://pastebin.com/0qrBE8uhBUT:
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?
Forum: Themes and Templates
In reply to: switch_theme()i’ve just written it into my plugin file and it works..
switch_theme(‘twentyten’, ‘twentyten’);
Forum: Themes and Templates
In reply to: switch_theme()i still dont know why it didnt work for me, but this is how to use it..
switch_theme(‘THEMENAME’, ‘THEMENAME’);
Forum: Plugins
In reply to: WordPress Page Theme Pluginthis:
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,Forum: Plugins
In reply to: WordPress Page Theme Pluginwhen 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
JanForum: Plugins
In reply to: Page theme Pluginwhen i write echo $page_theme.’, ‘; before the return, it outputs: , , , mytesttheme, mytesttheme, mytesttheme, mytesttheme,
EDIT:
in wp-backend it shows “mytesttheme” as post meta content in wp-core meta content box.. so the saving works as it should..Forum: Networking WordPress
In reply to: use special characters in blog addressesMy wordpress multisites have this structure
https://domain.com/BLOGADDRESS1/
https://domain.com/BLOGADDRESS2/And i would like to give the blogaddress the name of the domain that is linking to it.
my-domain-2.info should link to => https://domain.com/my-domain-2.info/
jan-rulez.net should link to => https://domain.com/jan-rulez.net/But WordPress does not allow to enter a . in backend.
Is it possible to change that? :S
Forum: Plugins
In reply to: allow user access to only 1 pluginNo ideas? :S
Forum: Fixing WordPress
In reply to: hide meta boxes only for users, not for adminsNo i did not.. – works perfectly now! Thank you.
What about my second question?
Does WordPress offer any function like this? => set_page_template(TEMPLATENAME, SITEID)
Forum: Networking WordPress
In reply to: Function Reference / add_role()Thanks for your help!