Call to undefined function get_header() in index.php
WordPress theme templates are not meant to be executed directly. They are loaded by WordPress core (after appropriate environment had been set up) according to Template Hierarchy.
WordPress theme templates are not meant to be executed directly. They are loaded by WordPress core (after appropriate environment had been set up) according to Template Hierarchy.
To change all author URLs one would normally change the author base, however, since you want multiple author bases, we’ll have to do things a bit differently. There are two parts to this – The first part is getting WordPress to recognize incoming requests for your custom author pages and route them properly. To do …
What I basically did was the following: Used Domain Mapping plugin in wp-config.php – Changed DOMAIN_CURRENT_SITE and NOBLOGREDIRECT to $_SERVER[‘HTTP_HOST’] as per what @toscho suggested in wp-config.php – Added: define(‘DOMAINMAPPING_ALLOWMULTI’, ‘yes’); // Allow sites to have multiple domains define(‘SUNRISE’, ‘on’); // Domain mapping plugin activation mapped relevant sub.domain.com to relevant sub.domain.eu The main site can …
I’ve found what was going on, so I’m going to answer it for future reference, as it’s a common issue without clear solution. TL;DR: If the WPML language which’s not redirecting has a country code (eg. en-US instead of en) then you probably have the same bug. Jump to section “How to fix it”. The …
OK, duh: I needed to have my plugin in the /mu-plugins dir to make its filter available early enough for function wp_get_active_and_valid_plugins().
I found an answer by searching in similar posts and links. I added a line to fit my needs (I wanted to prevent my blog page to get highlited when on a custom post).See this line: unset($classes[array_search(‘current_page_parent’,$classes)]); Solution function add_parent_url_menu_class( $classes = array(), $item = false ) { // Get current URL $current_url = current_url(); …
Your parent theme is probably broken. I guess it is using code like this: require_once get_stylesheet_directory() . ‘/admin/options-framework.php’; So it will search in the child theme for files that are present in the parent theme only. It should use get_template_directory() instead.
What you’re doing is, in my opinion, the best way to accomplish this. First off, the pages are a good way to go, because they give users the ability to customize parts of the page like title, meta fields, etc. You don’t have to use shortcodes per se, you can filter the_content for these pages, …
There is a bit of practical split about where WP can write files and if Filesystem API is invoked. It might be easier to see this divide not as technical, but as administrative. There is user space. Users must be able to do things like create attachments and must not need to have admin access …
HTML language includes a special tag for displaying inline code. To apply it to your text, switch to the ‘Text’ visual editor tab and place the <code> tag before your bit of code, and the </code> tag afterwards. If you want to use the backtick ` character for highlighting code like you do on Stack …