Skip to main content

Home/ Wordpress/ Group items tagged code-snippets

Rss Feed Group items tagged

Anna Johansson

Add page/post slug class to menu item classes | WPreso - 0 views

  •  

    function add_slug_class_to_menu_item($output){
    $ps = get_option('permalink_structure');
    if(!empty($ps)){
    $idstr = preg_match_all('/
    foreach($matches[1] as $mid){
Anna Johansson

Overriding WordPress Functions | venutip.com - 0 views

Vernon Fowler

WP-Snippets | WordPress Hacks, Snippets and Tips - 15 views

  •  
    Excellent source of help for WordPress development. Snippets are a great way to get information on how to complete simple and even complex tasks without having to reinvent the wheel. Very handy tool to have around
  •  
    I'm sure some of you have seen this before, but It's one of my favorite resources.
Vernon Fowler

Conditional Tags « WordPress Codex - 0 views

  • The Conditional Tags can be used in your Template files to change what content is displayed and how that content is displayed on a particular page depending on what conditions that page matches. For example, you might want to display a snippet of text above the series of posts, but only on the main page of your blog. With the is_home() Conditional Tag, that task is made easy.
  • is_single()  When any single Post (or attachment, or custom Post Type) page is being displayed. (False for Pages)
  •  
    Great for use with the Widget Logic plugin. A reference for all the conditional tags that help you restrict a widgets viewing.
  •  
    Warning: You can only use conditional query tags on or after the init action hook in WordPress. For themes, this means the conditional tag will never work properly if you are using it in the body of functions.php, i.e. outside of a function.
1 - 19 of 19
Showing 20 items per page