<?php get_cat_name( $cat_id ) ?> Get the category name if you have the id of it <?php get_category_link( $category_id ); ?> Get the category permalink
Category Archives: Wordpress
WordPress: produce new templates that can be used for new pages
Put them on your Themes directory, any php file that is there and includes the following header will be included in the drop-down menu for templates to choose from while creating a page: <?php/*Template Name: Custom Feed*/
WordPress: Adding the version of jquery that comes with the installation
wp_enqueue_script(‘jquery’);
WordPress: bringing a site from the ground up
These are the must haves, if you want your blog to be successful, and problem free 1) Active your Akismet plugin 2) Install Google Analitycs for WordPress from the get go. 3) Ditto for SEO. Here’s a good plugin: http://wordpress.org/extend/plugins/seo-ultimate/ 4) Subscribe to the following free auto-listing and update services (under “Settings / Writting”): http://codex.wordpress.org/Update_Services This […]
Adding actions to wordpress based on events
add_action($tag, $function_to_add, $priority, $accepted_args); add_filter($tag, $function_to_add, $priority, $accepted_args); The $tag parameter is where you specify the hook you want to add to; $function_to_add is the name of your function. The next two are optional, but worth knowing about: $priority is used to determine the order in which your action ought to occur, relative to other […]
Basic wordpress functions
All functions you want to overwrite, you can put it inside functions.php on your child theme, regarding pre-established functions: get_header grabs header.php get_footer grabs footer.php get_sidebar grabs sidebar.php get_searchform grabs searchform.php—if this is missing, WordPress simply renders a default search form comments_template grabs comments.php get_header(‘custom’), for example, will grab a file called header-custom.php get_template_part(‘partname’), which […]
WordPress: choosing and modifying a theme
1) Download thematic (as the parent theme) 2) Create a child theme folder for the new site, and activate it using wordpress admin screen 3) Choose the basic layout you need, by modifying this line: @import url(‘../thematic/library/layouts/2c-r-fixed.css’); You can also create your own layout at this point if you feel like it. Same with typography […]