Posted on Leave a comment

Add Action Hack to Register Sidebars, Menus and Widgets

Hybrid Child Menu Order

I have been editing, WordPress.com themes for more than 5 years not, and I have been doing these just by learning from books but mostly learning by doing. Today, 29 June 2017 I found myself confused why some of my extended/ additional widgets appear before Main Sidebar/ Widgets and why others appear after main sidebar/ widgets

/* Register sidebars. */ add_action( 'init', 'hybrid_theme_register_sidebars', 11 );

Hybrid Child Theme Sidebars / Widgets after adding action hooks
Hybrid Child Theme Sidebars / Widgets after adding action hooks

For example in my Hybrid Theme we have Primary, Secondary and Subsidiary Sidebars, plus Before Container, Before Content, After Singular, After Content and After Content Widgets. These are the “Main Sidebar/ Widgets” that come with the Hybrid Theme. Now, when I want to add more widgets/ sidebars to my Child Theme that I call “Hybrid Child Theme”. I added Home Sidebar, Archive Sidebar, Home Top Sidebar, Home Middle Sidebar and Home Bottom Sidebar, then when I click on Admin “Apperaance/Widgets”, it will appear like below:

Hybrid Theme Child Widgets before Changing the Order
Hybrid Theme Child Widgets before Changing the Order

After adding Number “11” to the add_action in functions.php, then the order of the additional widgets and sidebars follow after primary widgets and sidebars, as seen in the following image

Exactly the same thing happens with Menus, the primary and secondary menus appear after the additional menus in Child Theme if we register the additional menus without adding Number “11” or “12” or whatever it is after add_action Hooks. The following image shows the order of menus before adding the number

Hybrid Child Menu Order
Hybrid Child Menu Order Before Adding No. 11

Now after adding number “11” in this cafe, like this

then the following is what happens on the Admin Menu section

Hybrid Child Menu Order
Hybrid Child Menu Order after Adding No. 12

/* Register additional menus for HybridChild theme. */ /* Register additional menus for HybridChild theme. */ add_action( 'init', 'hybrid_child_register_menus', 11 );

For me this is a good revelation, from learning by doing. I know many people in the world out there have known this for long time, but for me at least, this is a useful experience to write and post it here.

Posted on Leave a comment

West Papua Launches New WordPress Themes

Papoo! wP WordPress Theme is based on both the famous and mostly used Hybrid and Sandbox WP Themes Frameworks.

  1. Sandbox Theme Framework:

Introduction

Once upon a time, I was an actively developing themes and plugins for WordPress. No more. No, I have since moved on to other projects. And while this site is no longer updated, I want it to remain because when I was developing for WordPress, I found referencing other themes and plugins useful, even necessary.

But with the inclusion of the three functions that were the heart and soul of the Sandbox now in the WordPress core, my mark has been made, and there are new directions to go. Those functions, sandbox_body_class(), sandbox_post_class(), and sandbox_comment_class(), can be found in your recent WordPress download, simply renamed as body_class(), post_class(), and comment_class(), respectively. Mission accomplished.

So I hope what I did contribute once upon a time will continue to be of some use to the community. Plaintxt.org has become a single-page archive of what it was. Enjoy.

2. Hybrid Theme Framework:

It’s been a long, arduous journey these past four months or so, which is how long I’ve been developing this theme.

Hybrid is more than just a WordPress theme. It’s about pushing the limits with what WordPress can do. It’s a framework. Something you can use to build anything from the smallest family blog to a powerful site that handles thousands of visitors a day.

It’s why I created Theme Hybrid. It’s the reason I love working with WordPress.

If I could list all the benefits of this theme without taking up too much of your time, I would. I’ll just give you the short list instead, so you can go ahead and play with the theme:
Developed with child themes in mind, so you’ll never lose your customizations.
SEO optimized. No need for plugins to handle this anymore.
Theme options that are about content/information.
Templates for everything.
13 page templates.
Actively developed for WP 2.7 but backward compatible down to 2.5.
15+ plugins supported within the theme.
Attachment handling like you’ve never experienced.
Advanced breadcrumbs beyond any other theme.
Ability to run just about any type of site.
And over 20 tutorials to start.

Like I said, that’s the short list.