Skip to main content

Home/ Wordpress/ Group items tagged wp-codex

Rss Feed Group items tagged

1More

Function Reference/wp title « WordPress Codex - 0 views

  • The wp_title() function should not be used by a theme in conjunction with other strings or functions (like concocting with bloginfo('name') ) to set the title because it will render plugins unable to rewrite page titles correctly. The best practice is to use the wp_title filter with a callback function. This method is now a requirement for themes.
1More

WordPress › Dashboard Tweaks « WordPress Plugins - 4 views

  •  
    "A list of the tweaks included in the Dashboard Tweaks plugin: - change the WordPress logo in the top-left of the admin bar with a custom admin logo - link that logo to the home URL instead of the new wp-admin/about.php - remove the entire sub-menu with links to Codex, forums and what not - remove the Visit Site sub-menu under the site's name - change "Howdy" into "Welcome back" - add a special favicon for the Dashboard only (ideally different from the frontend, but up to you) - change the tab title into a standard "Dashboard of [sitename]" - remove icons in front of Dashboard menus - reduce page heading size - remove publish icon of Add new Post/Page screens - add colored background to sidebar active sub-menu to add contrast - add colored background to activated plugins to add contrast - add custom footer text"
1More

Function Reference/is plugin active « WordPress Codex - 0 views

  •  
    include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
9More

Post Types « WordPress Codex - 1 views

  • it is better if you prefix your identifier with a short namespace that identifies your plugin, theme or website that implements the custom post type. For example: acme_product or aw_product for products post type used by a hypothetical ACMEWidgets.com website
  • Namespacing your custom post type identifier will not guarantee against conflicts but will certainly minimize their likelihood.
  • Do pay close attention to not having your custom post type identifier exceed 20 characters though, as the post_type column in the database is currently a VARCHAR field of that length.
  • ...6 more annotations...
  • register_post_type( 'acme_product', array( 'labels' => array( 'name' => __( 'Products' ), 'singular_name' => __( 'Product' ) ), 'public' => true, 'has_archive' => true, ) );
  • When you namespace a custom post type identifier and still want to use a clean URL structure, you need to set the rewrite argument of the register_post_type() function. For example, assuming the ACME Widgets example from above:
  • 'rewrite' => array('slug' => 'products'),
  • Note: In some cases, the permalink structure must be updated in order for the new template files to be accessed when viewing posts of a custom post type.
  • single posts of a custom post type will use single-{post_type}.php and their archives will use archive-{post_type}.php where {post_type} is the $post_type argument of the register_post_type() function.
  • In any template file of the WordPress theme system, you can also create new queries to display posts from a specific post type. This is done via the post_type argument of the WP_Query object.
7More

Child Themes « WordPress Codex - 0 views

  • A child theme resides in its own directory in wp-content/themes. The scheme below shows the location of a child theme along with its parent theme (Twenty Twelve) in a typical WordPress directory structure:
  • This directory can contain as little as a style.css file, and as much as any full-fledged WordPress theme contains: style.css (required) functions.php (optional) Template files (optional) Other files (optional)
  • @import url("../twentytwelve/style.css");
  • ...4 more annotations...
  • Note on the @import rule There must be no other CSS rules above the @import rule. If you put other rules above it, it will be invalidated and the stylesheet of the parent will not be imported.
  • Unlike style.css, the functions.php of a child theme does not override its counterpart from the parent. Instead, it is loaded in addition to the parent’s functions.php. (Specifically, it is loaded right before the parent’s file.)
  • But, when creating child themes, be aware that using add_theme_support('post-formats') will override the formats as defined by the parent theme, not add to it.
  • A child theme can override any parental template by simply using a file with the same name.
1More

Function Reference/wp is mobile « WordPress Codex - 0 views

  • This Conditional Tag checks if the user is visiting using a mobile device. This is a boolean function, meaning it returns either TRUE or FALSE.
8More

Embeds « WordPress Codex - 0 views

  • Twitter (WordPress 3.4+)
  • Make sure that the URL is on its own line and not hyperlinked
  • SoundCloud (WordPress 3.5+)
  • ...5 more annotations...
  • SlideShare (WordPress 3.5+)
  • Scribd
  • Flickr (both videos and images)
  • Vimeo (note older versions of WP have issues with https embeds, just remove the s from the https to fix)
  • YouTube (only public and "unlisted" videos and playlists - "private" videos will not embed)
1More

Function Reference/wp register sidebar widget « WordPress Codex - 0 views

  •  
    "wp_register_sidebar_widget( 'your_widget_1', // your unique widget id 'Your Widget', // widget name 'your_widget_display', // callback function array( // options 'description' => 'Description of what your widget does' ) );"
1 - 15 of 15
Showing 20 items per page