Tag Info

New answers tagged

0

Welcome to the community! While your question is pretty vague and cannot be answered specifically, I do believe an adequate overview answer is already on the official Codex. Take a look at the Theme Development section. Also, Chris Coyier has a fantastic step-by-step tutorial that he put together from start to finish of his website redesign. It shows you ...


0

Generally for creating child theme you must use like this for example if you want to create a child theme for twentytwelve theme. First you want to make a copy of the twentytwelve theme and paste in same theme section and rename the copied folder into some other name you want in here I named as theme1child in this theme1child you should delete the ...


1

WordPress core by itself doesn't support SCSS, even though it is actually used in core development now. The issue with "plugin" type solutions to add such support transparently is that they rely on "ports" of preprocessors. SCSS is not natively developed for PHP, running it in such environment is only possible with third party re–implementations. While ...


0

I suggest you start with the WP Bones theme startup theme. It's actually how i got into scss for the first time. It explains all you need to understand about scss and sets you up directly in a good file system and scss configuration for Wordpress. Also, you may feel more comfortable using a software like Codekit to handle the configuration and compilation ...


-1

Better options I've found so far: 1) http://wordpress.org/plugins/theme-test-drive/ or 2) http://wordpress.org/plugins/nkthemeswitch/ or 3) http://wordpress.org/plugins/theme-test-preview/ or 4) https://wordpress.org/plugins/user-theme/


0

Better options may be the following plugins: 1) http://wordpress.org/plugins/theme-test-drive/ or 2) http://wordpress.org/plugins/nkthemeswitch/


0

Solved: Okay, figured it out. WP was trying to grab the CSS URL from the wrong address. It added a ".com" to the end in the settings. I corrected the URL, and now CSS is working. Thanks for all the help WP.SE! Cheers!


0

Just add another AND (&&) clause to the end of it. <?php if ( is_woocommerce_activated() && isset( $woo_options['woocommerce_header_cart_link'] ) && 'true' == $woo_options['woocommerce_header_cart_link'] && sizeof( $woocommerce->cart->cart_contents ) !== 0) {...} Probably best to take a look at some of the PHP ...


1

Worst case scenario, just make a new environment, with that theme (can even be on the live), then just re-upload the CSS and anything else you've edited (successfully that is).


0

Turns out $wp_customize->get_section( 'sidebar-widgets-footer_widgets' ) was returning an Array, although a quick print_r() makes it seem as though it was an Object. Anyhow. Simple fix: cast it to an object. $footer_widgets_section = (object) $wp_customize->get_section( 'sidebar-widgets-footer_widgets' ); $footer_widgets_section->panel = '';


0

Try something like this: if ( !function_exists('get_field') && $_REQUEST['action'] != 'activate' ) This will prevent your function being defined for the run where a plugin is actually being activated.


0

First of all, I think you should never use important features like SEO provided by themes. You should use a dedicated plugin for that because you never know if you need to switch themes in future. And SEO is such a feature that sticks with website. Well, StudioPress is very smart and they already have a solution for this issue. They created a plugin SEO ...


0

Okay, I think I've got it working using the WP User Avatar plugin. I added this to Theme My Login's profile-form.php, copied to the root of my theme folder. <?php global $current_user; get_currentuserinfo(); do_action('edit_user_avatar', $current_user); ?> Then I added this to my functions.php file: function my_avatar_filter() { // ...


0

As @mrwweb suggested, theme support forum would be the better place for such question. However, as a suggestion- You can check from which file the scroll functionality is being applied via developer tool (e.g. Firebug, or any inbuilt tool of the browser) by doing 'inspect element' to the container/section where the scroll is happening slow and then you can ...


3

while agreeing 95% with Drew's answer I would like to attend to another point It's normally advised to not include custom types or taxonomies in themes as the themes will be less useful to other users, and would not be accepted by the WordPress theme repository. The word of the maintainers of the wordpress.org repository is not the word of god and ...


2

I don't think there's anything wrong with including functionality in a client theme. We do it with almost all of our custom builds as standard practice. What's really in play here is the difference, I think, between 'commercial' and 'client' work. The prevailing wisdom on not including custom post types/custom functionality in themes is more aimed at the ...


2

To start off, a theme does not require a functions.php file to operate. For example, a one page site can simply just have an index.php and a style.css file. Your functions.php file holds functions, filters and action hooks to add theme specific functionality to your site. This extends core functions, add complete new functionality or even remove existing ...


0

As the function file is load each time, you can decide to load different functions.PHP depending on user profil, id, to test your code. Create a new PHP file name it differently and include it at the end of the original functions.php like this i.e : If(current_id()==1){include('function_dev.php');} This will able you to change the behaviours of your ...


0

Solved: this was a folder permissions issue which was fixed with a chmod to the parent folder containing the affected assets. The appropriate permissions level in this case was 755. Hardening WordPress


1

Most theme's functions.php start the with the same boilerplate code and then is altered as the theme advances. Although they may have common features, they will vary among themes. For example, most themes make use of widget areas (sidebars). But there are many different configurations of them from the number of areas to the classnames or the type of elements ...


0

Each theme has a different functions.php, of course some code could be similar in different themes, but the functions in the file are used by the theme. You can use it to create custom functions, and for clarity and to separate view and logic, you add that functions to the functions.phptheme. Also, you have to take into account that Wordpress executes the ...


0

You could create a custom admin role and remove these standard admin capabilities: function remove_admin_capabilities() { $admin = get_role( 'administrator' ); $caps = array( 'install_themes', 'update_themes', 'delete_themes', 'edit_themes', 'switch_themes', 'edit_theme_options', ); foreach ...


1

Lot of useless comments on this post from what seems like a pretty simple question. change below "$theme_directory_name = twentyfourteen;" to your theme... thats all you have to do. First function sets your theme no matter what. Second one disables interface to edit themes. function selfish_hardcoded_theme() { $theme_directory_name = twentyfourteen; ...


0

In functions.php write this code function my_optionally_widgets() { $option = get_options('wantwidget'); if($option == 'yes') { register_widget('mywidget'); /* add other widgets for registration here */ } } add_action('widgets_init', 'my_optionally_widgets'); function my_optionally_sidebars() { $option = ...


0

The answer appears to be that it is possible: http://codex.wordpress.org/Creating_a_Static_Front_Page Configuration of front-page.php If it exists, the front-page.php template file is used on the site's front page regardless of whether 'Settings > Reading ->Front page displays' is set to "A static page" or "Your latest posts," the Theme will need ...


5

Since using WordPress without theme is quite rare the technicalities of it don't get much attention. First you have to understand there are multiple "endpoints" in WordPress core dealing with requests. admin side has its own (and numerous) ones, such as wp-admin/index.php. front side almost universally goes through index.php in the very root, but it's ...


17

I think there's a song for that: "Imagine there's no theme. It's easy if you try. No hell below us. Above us only sky ..." ;-) So in that imaginary dream: you can still fetch the RSS feeds from your site: example.com/feed/ you can still login to your backend: example.com/wp-login.php you can still access the backend and work there (almost) as ...


1

You can create a dummy theme, with just an index with static content, and check the value of get_num_queries() there, that way you can have an idea of how many queries the core executes, and then, do the same with the theme you want to use activated. I don't think this approach is gonna be perfect, but it could give you a good idea of the number of queries ...


2

You can use Query Monitor plugin for that Not quite sure if it distinguish between both but it's a great plugin for query monitoring and debugging.


1

You are looking for get_blog_details function. $blog_details = get_blog_details( $blog_id ); Here is the official documentation.


1

Without getting your hands too dirty, a lot of themes come with a CSS editor built-in so you overwrite rules. Feel free to do this for simple changes, and just be wary that your changes could get overwritten if you decide to update your theme in the future. However, if you feel comfortable going deeper, you can FTP your own CSS file with changes. This is a ...


5

There are tons of questions about using Ajax, so your question could be easily marked as duplicated but I see so BIG mistakes that I can't say to you that the question is duplicated without explaining your mistakes. The Ajax in Wordpress is handled in admin-ajax.php file, wehre you correctly sent the ajax request (see the url parameter of the Ajax call). ...


-2

Try to use complete instead of succes. Also, including wp-load isn't the best practice, what is the reason that you are including it?


0

There are two major strategies to choose from: Ideally, your development environment should be centered around a: distributed revision control and source code management system such as Git, together with a WordPress deployment system, such as Mark Jaquith's WP Stack. Otherwise, you will need to individually update each site with not only your updates to ...


0

If you mean in the footer? I looked at the Blaskan Theme, and saw hyphens in the footer menu. To change that... use CSS. Make the #footer-nav li:before { content: " \007C "; font-family: Arial, sans-serif; } That will change it from a hyphen. To a | To make it space out better, you may want to add padding-right: .4em;


0

You can change the number showposts=35 as you want <?php $page_num = $paged; if ($pagenum='') $pagenum =1; query_posts('showposts=35&paged='.$page_num); ?> <?php if ( have_posts() ) : ?> <div class"main"> <?php while ( have_posts() ) : the_post(); ?> <li>posts</li> <?php endwhile; ?> </div> ...


0

Ah! Sorry about this. It turns out after some further digging and playing around with the theme I figured out that the content.php file is what is being used. To combat this though I changed the include to content-home and duplicated and renamed the content.php file and now it works. Easy way to alter the design of the homepage. Answered.


0

Well you can make a single template for the entire site and may call different page content in different <div> using this code: <?php $page_id = 47; $page_data = get_page( $page_id ); echo $page_data->post_content ; ?>


1

Well I think I seem to be doing what I was intending too. Thanks @Milo for pointing me in the right direction! As You can see below I used the get_page_template_slug(); and str_replace() to filter through the templates used per page. Can someone Verify that this is a viable option? $args = array ( 'post_type' => 'page', ...



Top 50 recent answers are included