Some doubts about how to show posts in a custom theme?

get_template_part() is including a template file from the active theme directory. For example: get_template_part(‘content’) will include the template content.php from the theme folder. When having two parameters, it will search for a template named firstParameter-secondParameter.php. So: get_template_part( ‘content’, get_post_format() ); will include the content-{$post_format}.php file. get_post_format() returns one of this defined formats: aside chat gallery … Read more

Single_cat_title() print the title before text

Set the display argument of the function to false. <h2> <?php if (is_category()){ echo ‘Category: ‘ . single_cat_title( ”, false); } ?> </h2> Or, to use the function in its more “helpful” form you could do: single_cat_title(‘Category: ‘); If the display argument is true, WordPress automatically echoes the content on to the page usually within … Read more

Recommended tools for Theme Development with SASS [closed]

You can create a WordPress theme development environment in Windows VPS. You’ll need the following tools: Text Editors Aptana Studio 3 Netbeans Notepad++ Local WordPress Development Environments XAMPP InstantWP Debugging Tools Firebug Theme Check Debug Bar Plugin & Theme Development Tools Theme Demo Bar Responsive Select Menu Less & Sass PressTrends Font Awesome

Change settings of get_post_type_object

since WP 4.4.0, you can use this filter that allows you to change the arguments used in the original cpt registration. Add this to your functions.php file: add_filter( ‘register_post_type_args’, function( $args, $post_type ) { if( ‘wyde_portfolio’ === $post_type && is_array( $args ) ) $args[‘rewrite’][‘with_front’] = false; return $args; }, 99, 2 ); It’s taken from … Read more

Include Max mega menu Plugin into theme

If you include a plugin directly inside a theme then it will be rejected by both the WordPress.org theme directory and ThemeForest. You should use TGMPA for including plugins with themes: http://tgmpluginactivation.com/ Further reading: http://code.tutsplus.com/tutorials/using-the-tgm-plugin-activation-library-in-your-themes–cms-20901 Using TGMPA means the plugin remains a plugin, WordPress loads it in the normal ‘plugin’ way, and users will get … Read more