Tag Info

Hot answers tagged

20

You should run the code after theme setup. function osu_twentyten_continue_reading_link() { return ' <a href="'. get_permalink() . '">' . __( 'Read on <span class="meta-nav">&rarr;</span>', 'twentyten-child' ) . '</a>'; } function osu_twentyten_auto_excerpt_more( $more ) { return ' &hellip;' . ...


13

Hybrid Theme Hybrid, developed by Justin Tadlock. Scope of code is primarily PHP internal functionality and front-end templates for themes. Interesting features: code aims to minimize template edits, most of functionality can be controlled via hooks; context-aware - extended body-class, dynamic context-aware hooks that allow to hook events that fire only ...


8

Child Themes are useful for users who mainly want to make style changes to their Theme, but don't want - or know how - to maintain the underlying code. Grokking PHP/WordPress Theme Development is an entirely different thing than grokking CSS. Child Themes are also useful for users who want to implement minor functional changes to their Theme. This is ...


7

Overriding that template would be much easier than getting rid of it. Just the way logic goes. I make no claim it's efficient idea (late here), but this would get it nuked from edit screen: add_action('admin_head-post.php','remove_template'); function remove_template() { global $wp_themes; get_themes(); $templates = &$wp_themes['Twenty ...


7

Expanding on @Rarst's answer, here's a more generic approach that is not tied to a specific theme, but can be used inside your own child theme's functions.php to nuke any parent theme page templates you want to get rid of. function remove_template( $files_to_delete = array() ){ global $wp_themes; // As convenience, allow a single value to be used ...


7

Kind of - the template_directory is the directory of your parent theme. The stylesheet_directory is the directory containing the primary stylesheet in use (which, if you have a child template will be the in the child directory, otherwise it will be in the template directory). See the Codex here: 'stylesheet_url' - Returns the primary CSS (usually ...


6

In addition to Chip Bennets answer Some developers like myself have their own custom frameworks or are using one like Genesis, Hybrid, etc. Those frameworks don't bundle too much styling, but more functionality like their own templating and hooking mechanisms. Sometimes also stuff like CPT or CT base classes, meta box libraries, css frameworks, etc. It's ...


6

Just FYI, this question probably borders on too localized, as it is specific to the Oenology Theme. That said, here's where I think you're having a problem: Oenology enqueues two style sheets: style.css, directly in the document head (thus before wp_head() is fired) {varietal}.css, at wp_enqueue_scripts, with priority 11, in functions/dynamic-css.php: ...


5

One of the biggest uses for child themes is in MUWP instances. Often, in a multisite install, the related sites share some or most of the theme, but may need to have some custom page layouts or element styles. In this case, it makes a lot of sense to use child themes. Elements that are the same are addressed in the parent theme (which may in fact be a custom ...


4

Canvas Purpose Advanced standalone/parent theme, uses WooFramework. For sketching out sites and concepts. Building a version 1 without having to do so from scratch. Strong features I find the theme code very easy to hack for my purposes. Canvas uses a lot of new HTML and CSS features in a smart way. Downsides Not free (but free software) ...


4

Generally speaking, Child Themes were originally intended to be able to do two things: Override parent Theme CSS Override parent Theme template files I doubt that the Theme developer intends for the /function-includes/theme-functions.php file to be overridden by a Child Theme. Functional files are usually a core component of the Theme, and allowing a ...


3

You can enable child themes for any theme: http://codex.wordpress.org/Child_Themes If you want your parent theme based off another parent theme, for example you want a theme based off of Twitter bootstrap and apply any changes they make to your framework, without over-riding your changes, use revision control. Git Mercurial etc.


3

It depends entirely on a) what functions and template files you're talking about, and b) how those functions are defined, or template files are called, in the Parent Theme. If the Parent Theme uses get_template_part(), then you're golden. If the Parent Theme uses get_stylesheet_directory_uri() or STYLESHEETPATH, then you can override, with caveats. If the ...


3

Your site is not using a Child Theme. It is currently using the WordFruit Theme, and this Theme does not declare any Theme as a Template. If it were, you would see a Template: parent-theme header tag (where "parent-theme" would be, e.g. twentyeleven if it were using Twenty Eleven as its parent Theme) in style.css Thus, WordFruit appears to be a stand-alone ...


2

While I agree with Justin Tadlock on a lot of things, I strongly disagree with him on this. The reason parent/child themes exist is that there's a lot of common functionality used across websites. Instead of re-inventing the wheel every time, it's better to build from a solid base that has been tested by hundreds of developers and used on tens of thousands ...


2

Not using the current system. In order to serve as a valid Template for a Child Theme, the Parent Theme must exist, and be a valid Theme. That's because the Parent Theme's template files must be accessible via locate_template(), in order for the Child-Parent fallback to work properly. Note: if this core Trac ticket is implemented, then you'll be able to ...


2

SWIFT On my private blog i use : http://swiftthemes.com/ purpose: standalone theme but child themes are supported with demo childtheme Kill Bill theme included strong features: out of the box it includes a real handy template adjustable in the end user menu system nice friendly creater and user community its easy to understand and easy hackable which ...


2

On your wordpress menu use another class instead of "blog" for the blog item, cause your theme has a function that add a similar class to the body so it's creating a conflict in there, try erasing your blog class for you to notice. Also the app.css if for ur custom css :), no need to use both.


2

That's pretty simple: You're trying to get the parent property from the $post object, but that is either NULL or simply not attached. In both cases, you are Trying to get property of non-object from the $post object. Simply check if ( isset( $post->parent ) ) { /* do stuff */ }.


1

You should always use wp_enqueue_style() to load your stylesheet and that functions should be hooked to the wp_enqueue_scripts hook with runs in the head. I suspect that you weren't hooking it there, hence your problem. (As of WP 3.3, if wp_enqueue_style() is hooked to anything else, it throws a Notice with WP_Debug turned on).


1

Answer remade. The original was a wild idea... The solution is the same as the one posted by Rarst in the question linked How to *remove* a parent theme page template from a child theme? Difference being the admin_head hook. And a check for only running in edit-page and not in edit-post or edit-custom_post_type, as all these cases are fired by ...


1

if it the functions file, the child theme is loaded in conjunction with it's parent, the child being loaded first. If its the index.php file, you need to make sure your WordPress version greater than or equal to 3.0. Otherwise, your index.php file won't overwrite. A lot of reworking of themes has happened in the last year, so make sure you check out ...


1

Handle all the class loading in your parent theme on a predictable action (point in time) and hook in later in your child theme. Example: add_action( 'wp_loaded', 'parent_prefix_load_classes', 10 ); function parent_prefix_load_classes() { $classes = array ( 'Extra_Comment_Walker', 'Extra_Nav_Menu_Walker ); foreach ( $classes as $class ) { ...


1

You can use <?php get_template_directory_uri(); ?> to reference your parent theme folders. From the WordPress codex: In the event a child theme is being used, the parent theme directory URI will be returned...


1

On the init action, remove the action calling their function and enqueue an action calling your (differently named) function, like this: add_action('init', 'wpse_80107_init'); function wpse_80107_init() { // remove parent theme's header content action remove_action('cyberchimps_header_content', 'cyberchimps_logo_icons'); // add child theme's ...


1

What kind of updates are you talking about? Your understanding is basically correct: if you make a theme from a starter theme, that theme won't be automatically updated. But depending on what kind of updates you're talking about, your themes shouldn't need to be updated every time a new version of WordPress is released. New versions of WP don't make old ...


1

Since previous answers no longer work here in current versions of WordPress and there was a related question which I just answered (April 2013) using a PHP output buffer I figured I'd post a link to that answer. Also just published the Omit Parent Theme Page Templates plugin that filters out all parent theme page templates from the dropdown list of ...


1

Is this even possible? If your description is correct and ... The function is not pluggable, by which I assume you mean not wrapped in a if (!function_exists()) condition and The function is not a callback for an action or a filter and The function is not in a theme file that gets automatically substituted by the template loading system ... then you ...


1

Of course right after I post this, I find an answer...so hopefully someone else can benefit from this. For me, the answer was instead of unregistering nav menu items, I needed to just remove the action...so my function now looks like this: function remove_cornerstone_menus() { remove_action('init', 'cornerstone_menus'); } add_action('init', ...


1

Here is what worked: add_action( 'after_setup_theme', 'parent_override' ); function parent_override() { unregister_sidebar('sidebar-4'); /** I have looked for the ID of the sidebar by looking at * the source code in the admin.. and saw the widget's id="sidebar-4" */ register_sidebar(array( 'name' => 'Footer', ...



Only top voted, non community-wiki answers of a minimum length are eligible