Tag Info

Hot answers tagged

6

The user decides To answer your last question first: I tried adding the plugin inside the theme plugin folder [...] What am I doing wrong? You are trying to bundle functionality into a theme. That is the wrong thing in the first place. Themes offer presentation - Plugins offers functionality. Aside from that, functionality should be the users choice. ...


4

Change this line: Template: Default Template to Template: wp_techgostore-theme-package As per the WordPress Codex, The Template line corresponds to the directory name of the parent theme


3

Actually, what you have described is the correct way to do things and there shouldn't be any noticeable impact on site speed and performance. Using child themes also has the benefit of allowing your changes to persist through theme upgrades.


2

The posts page is a special case that's hardcoded into core- it lets a page's main query be converted to a posts query. In this situation, the posts page ceases to be a "page" in the conventional sense- is_page is false, you can't access the page's content, etc.. Doing this page-query-to-posts-query conversion with the main query for any other sort of page ...


2

There's no method to bundle a plugin with a theme install. Your best bet would be to check if a plugin is installed using is_plugin_active in your functions.php. If not, display a notice in the admin area directing them to download/install it.


2

One option would be to load all items in the nav menu into the page when it is being generated using wp_get_nav_menu_items( $menu_name, $args ) Another possible way to do that would be to use ajax to grab the page in question and append it to the end of the current content before the scroll action is fired. However, there are a few possible problems with ...


2

This is more server config question than WordPress. Make sure the www-data group has write permissions in the directory you're running WordPress from. Assuming it's in /var/www/ then sudo chmod -R g+rwxs /var/www/ should do the trick.


1

You can add below code to your child theme. @media screen and (min-width: 59.6875em) { .site-content { float: left; margin-left: 0px; width: 70.5882%; } .sidebar { float: right; right:0; margin-right: 0px; max-width: 413px; width: 29.4118%; } body:before { ...


1

If it's just for your understanding, then install the Query Monitor plugin, which gives you a lot of information about what's going on under the hood


1

Do not rely on the codex. Some pages are just a heap of crap and totally useless. The problem with the codex is that everybody with an account on wordpress.org can change and alter the codex as they see fit. I don't say, Do not use the codex, I'm saying that you need to be cautious. You need to read the codex in conjuction with the actual source code. ...


1

I believe what you are looking for is a custom nav walker to control your HTML structure. The WP Codex article lists a good example for controlling the HTML structure of a menu http://codex.wordpress.org/Class_Reference/Walker#General_Menu_Example // Tell Walker where to inherit it's parent and id values var $db_fields = array( 'parent' => ...


1

OK got it. For anyone who needs to do this , it is best you extend Walker_Nav_Menu class if you just need to add things to existing wp menu structure. Otherwise if you are extending Walker class you kinda have to rebuild the menu completely. Include this class class Walker_Extend_Menu extends Walker_Nav_Menu { // Tell Walker where to inherit it's ...


1

You can replace the broken functions.php file, recovering it from the original theme package. From the namespace of your error message I can guess that the theme you are using could be this: https://wordpress.org/themes/catch-box Right? I hope it helps.


1

You could develop your own metabox for the page (with custom styling, probably) that allows selection of the template. I don't know that generating screenshots is feasible, but you could definitely have it pull from some sort of associated file (eg: template name is template-name.php, screenshot is template-name.png). With the replacement selection method ...


1

Yes, you can enable a theme for a single site (as opposed to enabling it for your entire Multisite network). Go to the site's Edit Site backend page and select the Themes tab. The URL should be something like example.com/wp-admin/network/site-themes.php?id=[site ID]. You'll need Super Admin privileges on the Multisite network. Enable the theme(s) you'd ...


1

As already stated, the method you are using is the recommended way of doing it. Wordpress is written in such a way that it will always look for a template in a child theme first if there is an active child theme before looking for a template in the parent theme. So coming to performance, there is no impact on performance as these checks are performed ...


1

You could use the template_redirect hook to check and see if your post is a category and then whether it is a sub-category ... and if so, force a different template. For example (assuming you are using wordpress categories) function my_maybe_override_category_template( $template ) { # Make sure you are about to show a category term if ( ...


1

Go to Settings -> SiteOrigin Page Builder. Enable "Bundled Widgets" and save settings. Embedded Videos (PB) should be available now.


1

It is very hard to guess, the bit about permissions is peculiar. The steps I would take to locate or at least narrow down the issue: Verify or reinstall core files Enable WP_DEBUG and see if there are related errors Dump get_included_files() and see if there are any unexpected/external files


1

Unfortunately WordPress does not support third-level admin menu, so there's no easy way to achieve the result you want. You can only remove these 4 submenu items, add a submenu item instead which will be a link to a custom admin page and display these 4 links within that page (content). Read about following hooks: remove_submenu_page() add_submenu_page() ...



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