Search Results

Search found 201 results on 9 pages for 'theming'.

Page 2/9 | < Previous Page | 1 2 3 4 5 6 7 8 9  | Next Page >

  • Wordpress Hooks vs. includes?

    - by Chris J. Lee
    This is somewhat a subjective question. Noticed themes like thematic and carrington use hooks to display their themes. Trying to figure out which works best for a more efficient workflow. Which seems more efficient at theming? Trying to weigh in the cons and pros of hooks vs. just including static files.

    Read the article

  • How does one inject variables into page templates from a custom Drupal module?

    - by Michael T. Smith
    We've created a custom module for organizing and publishing our newsletter content. The issue I'm running into now -- and I'm new to theming and Drupal module development, so it could just be a knowledge issue as opposed to a Drupal issue -- is how to get each newsletter themed. At this point the URL structure of our newsletter will be: /newsletters/{newsletter-name}/{edition-name}/{issue-date} which means that we can create template files in our theme using filenames like page-newsletters-{newsletter-name}-{edition-name}.tpl.php, which is great. The one issue I'm running into is that all of the content comes through in the $content variable of the theme. I'd like to have it come through as different variables (so that I can, inside the theme, place certain content in certain areas.) Is there a proper way for doing this?

    Read the article

  • How do I use theme preprocessor functions for my own templates?

    - by Jergason
    I have several .tpl.php files for nodes, CCK fields, and Views theming. These template files have a lot of logic in them to move things around, strip links, create new links, etc. I understand that this is bad development and not "The Drupal Way". If I understand correctly, "The Drupal Way" is to use preprocessor functions in your template.php file to manipulate variables and add new variables. A few questions about that: Is there a naming convention for creating a preprocessor function for a specific theme? For example, if I have a CCK field template called content-field-field_transmission_make_model.tpl, how would I name the preprocessor function? Can I use template preprocessor functions for node templates, CCK field templates, and Views templates? Do they have different methods of modifying template variables or adding new ones?

    Read the article

  • Passing data between Drupal module callback, preprocess and template

    - by rob5408
    I've create a module called finder that I want to take parameters from a url, crunch them and then display results via a tpl file. here's the relevant functions... function finder_menu() { $items = array(); $items['finder'] = array( 'page callback' => 'finder_view', 'access callback' => TRUE, ); return $items; } function finder_theme($existing, $type, $theme, $path) { return array( 'finder_view' => array( 'variables' => array('providers' => null), 'template' => 'results', ), ); } function finder_preprocess_finder_view(&$variables) { // put my data into $variables } function finder_view($zipcode = null) { // Get Providers from Zipcode return theme('finder_view', $providers); } Now I know finder_view is being called. I also know finder_preprocess_finder_view is being called. Finally, I know that result.tpl.php is being used to output. But I cannot wrap my head around how to do meaningful work in the callback, somehow make that data available in the preprocessor to add to "variables" so that i can access in the tpl file. in a situation where you are using a tpl file is the callback even useful for anything? I've done this in the past where the callback does all the work and passes to a theming function, but i want to use a file for output instead this time. Thanks...

    Read the article

  • Please help! Every Post link links to the most recent post Wordpress

    - by kwek-kwek
    I got the site up on time, with one blog post up. Later I added another one and tested it. Big problem! Any link that used to take you to the old post (ie: side-bar "Recent Posts" links) now takes you to the newest one. I tested it by adding a third post, and got the same result. This is a custom wordpress theme and I have a, page.php <?php get_header(); ?> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div id="BodyWrap"> <!--MAIN CONT--> <div id="mainCont"> <?php get_sidebar(); ?> <?php if (is_page(array('home'))) { ;?> <div id="rotateBanner"> <div id="slide-holder"> <div id="slide-runner"> <img id="slide-img-1" src="<?php bloginfo('template_url'); ?>/images/banner/testimonial2.jpg" class="slide" alt="" /> <img id="slide-img-5" src="<?php bloginfo('template_url'); ?>/images/banner/testimonial5.jpg" class="slide" alt="" /> <img id="slide-img-2" src="<?php bloginfo('template_url'); ?>/images/banner/testimonial1.jpg" class="slide" alt="" /> <img id="slide-img-6" src="<?php bloginfo('template_url'); ?>/images/banner/testimonial6.jpg" class="slide" alt="" /> <img id="slide-img-3" src="<?php bloginfo('template_url'); ?>/images/banner/testimonial3.jpg" class="slide" alt="" /> <img id="slide-img-7" src="<?php bloginfo('template_url'); ?>/images/banner/testimonial7.jpg" class="slide" alt="" /> <img id="slide-img-4" src="<?php bloginfo('template_url'); ?>/images/banner/testimonial4.jpg" class="slide" alt="" /> <img id="slide-img-8" src="<?php bloginfo('template_url'); ?>/images/banner/testimonial8.jpg" class="slide" alt="" /> <div id="slide-controls"> <p id="slide-client" class="text" style="display:none;"><span></span></p> <p id="slide-desc" class="text" style="display:none;"></p> <p id="slide-nav" style="display:none;"></p> </div> </div> <script type="text/javascript"> if(!window.slider) var slider={};slider.data=[{"id":"slide-img-1","client":"nature beauty","desc":"nature beauty photography"},{"id":"slide-img-5","client":"nature beauty","desc":"nature beauty photography"},{"id":"slide-img-2","client":"nature beauty","desc":"nature beauty photography"},{"id":"slide-img-6","client":"nature beauty","desc":"nature beauty photography"},{"id":"slide-img-3","client":"nature beauty","desc":"nature beauty photography"},{"id":"slide-img-7","client":"nature beauty","desc":"nature beauty photography"},{"id":"slide-img-4","client":"nature beauty","desc":"nature beauty photography"},{"id":"slide-img-8","client":"nature beauty","desc":"nature beauty photography"}]; </script> </div> </div> <?php } ?> <?php if (is_page(array('accueil'))) { ;?> <div id="rotateBanner"> <div id="slide-holder"> <div id="slide-runner"> <img id="slide-img-1" src="<?php bloginfo('template_url'); ?>/images/banner/testimonial1-fr.jpg" class="slide" alt="" /> <img id="slide-img-5" src="<?php bloginfo('template_url'); ?>/images/banner/testimonial5-fr.jpg" class="slide" alt="" /> <img id="slide-img-2" src="<?php bloginfo('template_url'); ?>/images/banner/testimonial2-fr.jpg" class="slide" alt="" /> <img id="slide-img-6" src="<?php bloginfo('template_url'); ?>/images/banner/testimonial6-fr.jpg" class="slide" alt="" /> <img id="slide-img-3" src="<?php bloginfo('template_url'); ?>/images/banner/testimonial3-fr.jpg" class="slide" alt="" /> <img id="slide-img-7" src="<?php bloginfo('template_url'); ?>/images/banner/testimonial7-fr.jpg" class="slide" alt="" /> <img id="slide-img-4" src="<?php bloginfo('template_url'); ?>/images/banner/testimonial4-fr.jpg" class="slide" alt="" /> <img id="slide-img-8" src="<?php bloginfo('template_url'); ?>/images/banner/testimonial8-fr.jpg" class="slide" alt="" /> <div id="slide-controls"> <p id="slide-client" class="text" style="display:none;"><span></span></p> <p id="slide-desc" class="text" style="display:none;"></p> <p id="slide-nav" style="display:none;"></p> </div> </div> <script type="text/javascript"> if(!window.slider) var slider={};slider.data=[{"id":"slide-img-1","client":"nature beauty","desc":"nature beauty photography"},{"id":"slide-img-5","client":"nature beauty","desc":"nature beauty photography"},{"id":"slide-img-2","client":"nature beauty","desc":"nature beauty photography"},{"id":"slide-img-6","client":"nature beauty","desc":"nature beauty photography"},{"id":"slide-img-3","client":"nature beauty","desc":"nature beauty photography"},{"id":"slide-img-7","client":"nature beauty","desc":"nature beauty photography"},{"id":"slide-img-4","client":"nature beauty","desc":"nature beauty photography"},{"id":"slide-img-8","client":"nature beauty","desc":"nature beauty photography"}]; </script> </div> </div> <?php } ?> <?php if (is_page(array('contact-us'))) { ;?> <div id="rotateBanner"> <?php custom_field_image() ?> </div> <?php } ?> <div id="mainCopy"> <div id="content"> <h2> <?php if (is_page('home','accueil')) : ?> <?php else : ?> <?php single_post_title(); ?> <?php endif; ?></h2> <?php the_content('<p class="serif">Read the rest of this page &raquo;</p>'); ?> <?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?> </div> </div> <?php if (is_page(array('home','accueil'))) { ;?> <div id="rightCol2"> <div id="Fworks"> <h2>Featured work</h2> <li><img src="<?php bloginfo('template_url'); ?>/images/portage-thumb.jpg" width="234" height="92" border="0" alt="" /></li> <li><a href="<?php bloginfo('url'); ?>our-work/foundation-on-antivirals"><img src="<?php bloginfo('template_url'); ?>/images/fav-thumb.jpg" width="234" height="92" border="0" alt="" /></a></li> <li><img src="<?php bloginfo('template_url'); ?>/images/danslejardin-thumb.jpg" width="234" height="92" border="0" alt="" /></li> </div> <div id="NewEvents"> <?php if ( (strtolower(ICL_LANGUAGE_CODE) == 'en') ) {echo("<h2>News &amp; Events</h2");} ?> <?php if ( (strtolower(ICL_LANGUAGE_CODE) == 'fr')) echo("<h2>Nouvelles</h2") ?> <div id="NewsListings"> <ul> <?php //dbem_get_events_list("limit=5&scope=al&order=DESC"); ?> <?php include('events.php');?> </ul> </div> </div> </div> <?php } ?> </div> </div> <?php endwhile; endif; ?> <?php get_footer(); ?> single.php <?php /** * @package WordPress * @subpackage Default_Theme */ get_header(); ?> <div id="BodyWrap"> <!--MAIN CONT--> <div id="mainCont"> <?php get_sidebar(); ?> <?php if (is_page(array('home','contact-us'))) { ;?> <div id="rotateBanner"> <?php custom_field_image() ?> </div> <?php } ?> <div id="mainCopy"> <div id="content" class="widecolumn" role="main"> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <!-- <div class="navigation"> <div class="alignleft"><?php previous_post_link('&laquo; %link') ?></div> <div class="alignright"><?php next_post_link('%link &raquo;') ?></div> </div> <br class="clr" />--> <div <?php post_class() ?> id="post-<?php the_ID(); ?>"> <h2><?php the_title(); ?></h2> <div class="entry"> <?php the_content('<p class="serif">Read the rest of this entry &raquo;</p>'); ?> <?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?> <?php the_tags( '<p>Tags: ', ', ', '</p>'); ?> <!--<p class="postmetadata alt"> <small> This entry was posted <?php /* This is commented, because it requires a little adjusting sometimes. You'll need to download this plugin, and follow the instructions: http://binarybonsai.com/wordpress/time-since/ */ /* $entry_datetime = abs(strtotime($post->post_date) - (60*120)); echo time_since($entry_datetime); echo ' ago'; */ ?> on <?php the_time('l, F jS, Y') ?> at <?php the_time() ?> and is filed under <?php the_category(', ') ?>. You can follow any responses to this entry through the <?php post_comments_feed_link('RSS 2.0'); ?> feed. <?php if ( comments_open() && pings_open() ) { // Both Comments and Pings are open ?> You can <a href="#respond">leave a response</a>, or <a href="<?php trackback_url(); ?>" rel="trackback">trackback</a> from your own site. <?php } elseif ( !comments_open() && pings_open() ) { // Only Pings are Open ?> Responses are currently closed, but you can <a href="<?php trackback_url(); ?> " rel="trackback">trackback</a> from your own site. <?php } elseif ( comments_open() && !pings_open() ) { // Comments are open, Pings are not ?> You can skip to the end and leave a response. Pinging is currently not allowed. <?php } elseif ( !comments_open() && !pings_open() ) { // Neither Comments, nor Pings are open ?> Both comments and pings are currently closed. <?php } edit_post_link('Edit this entry','','.'); ?> </small> </p>--> </div> </div> <?php comments_template(); ?> <?php endwhile; else: ?> <p>Sorry, no posts matched your criteria.</p> <?php endif; ?> </div> </div> </div> </div> <?php get_footer(); ?> index.php <?php get_header(); ?> <!--MAIN WRAP--> <div id="BodyWrap"> <!--MAIN CONT--> <div id="mainCont"> <?php get_sidebar(); ?> <div id="mainCopy"> <div id="content"> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <div id="BGHeadTitle"><h2><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2></div> <?php the_content(); ?> <p><?php the_time('F j, Y'); ?> at <?php the_time('g:i a'); ?> | <?php the_category(', '); ?> | <?php comments_number('No comment', '1 comment', '% comments'); ?></p> <?php comments_template(); // Get wp-comments.php template ?> <?php endwhile; else: ?> <h2>Woops...</h2> <p>Sorry, no posts we're found.</p> <?php endif; ?> <p align="center"><?php posts_nav_link(); ?></p> </div> </div> </div> </div> <?php get_footer(); ?> my recent post code : <ul> <?php query_posts('cat=3,4,5&posts_per_page=5&order=ASC&orderby=date'); if ( have_posts() ) : while ( have_posts() ) : the_post()?> <li> <span class="date"><?php the_time('M j') ?></span> <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a> </li> <?php endwhile; ?> <?php rewind_posts(); ?> </ul> I am really stuck the site went live and when I was working on the testserver I only noticed it.view the site here »

    Read the article

  • [WordPress] Hide Custom Fields in New Post?

    - by Norbert
    I just started out with WordPress and I'm having some problems with the custom fields. Here's the code from functions.php add_post_meta($post_id, 'Post Thumbnail', $post_thumb, true) or update_post_meta($post_id, 'Post Thumbnail', $post_thumb); add_post_meta($post_id, 'Project URL', $url, true) or update_post_meta($post_id, 'Project URL', $url); add_post_meta($post_id, 'Project Thumbnail', $thumb, true) or update_post_meta($post_id, 'Project Thumbnail', $thumb); The problem is that they show up when I try to create a new post like so: The other problem is that they don't even work, only if I publish the post, go back and readd each field. Is there any way to hide the fields to only show the "Add new custom field:" part? Thank you!

    Read the article

  • Add php element to custom page in Wordpress

    - by citadelgrad
    I'm trying to customize a wordpress page to include an iframe which give the users a link to there download. We're using wordpress 2.9.2 with the Thesis theme 1.51. I've been trying to use thesis hooks but appears that the php is stripped from the output. Help? Suggested alternatives? Code from custom_functions.php: function add_ejunkie_download_link () { is_page('slug-url-of-page') { ?> <?php echo '<iframe src="https://www.e-junkie.com/ecom/rp.php?noredirect=true&client_id=CID&txn_id=' . htmlspecialchars($_GET["txn_id"]) . '" width="100%" frameborder="0" height="50px"></iframe>'; ?> <?php } } remove_action('thesis_hook_custom_template', 'thesis_hook_custom_template'); add_action('thesis_hook_custom_template', 'add_ejunkie_download_link');

    Read the article

  • Hide Custom Fields in New Post?

    - by Norbert
    I just started out with WordPress and I'm having some problems with the custom fields. Here's the code from functions.php add_post_meta($post_id, 'Post Thumbnail', $post_thumb, true) or update_post_meta($post_id, 'Post Thumbnail', $post_thumb); add_post_meta($post_id, 'Project URL', $url, true) or update_post_meta($post_id, 'Project URL', $url); add_post_meta($post_id, 'Project Thumbnail', $thumb, true) or update_post_meta($post_id, 'Project Thumbnail', $thumb); The problem is that they show up when I try to create a new post like so: The other problem is that they don't even work, only if I publish the post, go back and readd each field. Is there any way to hide the fields to only show the "Add new custom field:" part? Thank you!

    Read the article

  • Drupal 6: Drupal Themer gives same candidate name for different type of content types

    - by artmania
    Hi friends, I'm a drupal newbie... I have different type of contents like News, Events, etc. and their content is different. News detail page has title-content text-date. but Events detail page has title-date-content text-location-speaker-etc. So I need different layout page for these different types. So, I enabled Drupal Themer to get a candidate name. for events page, it gave me page-node.tpl.php and it gives same for News page as well :( how can I separate these pages? I expected sth like page-event-node.tpl , but no... :/ Drupal Themer also give unique candidate name for event page like page-node-18.tpl.php but it doesnt mean anything since I can not create a general layout for all events by this node name. :( Appreciate helps so much!! Thanks a lot!!!

    Read the article

  • Accessing original WordPress blog's DB from sub-blogs in network mode

    - by aendrew
    I'm helping with a university radio station website that runs WordPress and was recently switched over to Network (Multi-site/multi-user) mode by myself. The setup is as such: The parent site (www.stationID.com) runs a bunch of custom-built plugins to construct things like the show schedule calendar, the "Now Playing" widget, podcast list, et cetera. The new network websites ("wiki.stationID.com", "buddypress.stationID.com" for instance) run the same template as the parent site, but it stops after rendering the first section because the widgets from point 1 grab data from the main site's database that is not available to sub-blogs. My question is: how do I get data from the main site's tables on the sub-domain sub-blogs? A related question is: how do I set the $wpdb->prefix to be the same as the parent site on the child websites without it negatively effecting how the child website pulls data from its own database? Any help would be awesome, thanks!

    Read the article

  • How to use walker to replace core function

    - by bellesebastien
    I want to modify the way pages are listed in the navigation, particularly the function el_start from wp-includes/classes.php. I've first modified the classes.php directly and it worked fine butnow I want to revert classes.php and move the modification out of wordpress' internal files. I wrote a walker class that I want to use but I don't know how to use it. I want to replace the current call wp_list_pages() to this: $walker_pages = new Walker_Page_CustomTitle; wp_list_pages(array('walker' => $walker_pages, 'title_li' => '', 'depth' => '1')); I've tried using a filter like so: function wp_list_pages_custom() { $walker_pages = new Walker_Page_CustomTitle; wp_list_pages(array('walker' => $walker_pages, 'title_li' => '', 'depth' => '1')); } add_filter('widget_area_primary_aside', 'wp_list_pages_custom'); But with this filter, the site won't load anymore. The tutorial here says I should put this code in header.php but that just puts my page links in the tag. I hope I'm making sense. Thanks.

    Read the article

  • wp_get_archives(cat=id) <-- Any way to specifiy cat id in archives?

    - by Matrym
    Does anyone know how to specify an INCLUDE ONLY category using wp_get_archives? I would like to specify a category but then list results by month. I've tried kwebble's plugin to no avail. I've also found the following on WP forums, but it appears to only exclude categories. Perhaps it can be modified to do include? Even given that, I'm not sure how I would call it... Thanks in advance! add_filter( 'getarchives_where', 'customarchives_where' ); add_filter( 'getarchives_join', 'customarchives_join' ); function customarchives_join( $x ) { global $wpdb; return $x . " INNER JOIN $wpdb->term_relationships ON ($wpdb->posts.ID = $wpdb->term_relationships.object_id) INNER JOIN $wpdb->term_taxonomy ON ($wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id)"; } function customarchives_where( $x ) { global $wpdb; $exclude = '1'; // category id to exclude return $x . " AND $wpdb->term_taxonomy.taxonomy = 'category' AND $wpdb->term_taxonomy.term_id NOT IN ($exclude)";

    Read the article

  • wordpress mu theme per-user options

    - by pixeline
    Is it possible to add an options screen to a Wordpress MU theme (options being saved for each user, so blogwide, not sitewide) ? I'm used to program wordpress themes, but i'm a bit puzzled as to how make customization happen in a multi-user environment.

    Read the article

  • Different sidebars for each Wordpress page

    - by Remy
    I'm making a Wordpress 2.9.2 theme, and I'd like each page to have its own sidebar than can be edited as easily as the page's content. It would be cumbersome to make a different template file for each sidebar. It would also be weird to add a "custom field" containing all the sidebar text, since I wouldn't be able to use the Visual/HTML editor. What I'd like is to have a tag similar to the tag, but instead of delimiting the content to be shown on the front page, it would split the post's content and sidebar. Is this possible? Or is there a better solution?

    Read the article

  • Relative Footer with Absolute DIV Elements

    - by Alex
    Hi, I'm creating a wordpress theme where the header and the nav bar are positioned absolutely, and the footer needs to be positioned relatively depending on the height of the content on each page. When I try to set the footer's positioning to relative, however, it appears at the top of the page underneath the content. All elements are in a relatively positioned container. Is there any way to fix this, or to dynamically get the height of the content plus the header and nav bar? The structure of the page is as follows: <div id="container"> <div id="header"> </div> <div id="navbar"> </div> <div id="content"> Dynamically generated and variable height content here. </div> <div id="footer"> </div> </div> And the relevant css is: #container { position: relative; margin:0px auto; width: 945px; text-align: left; } #header, #navbar{ background-color: #FFFFFF; position: absolute; margin-right: auto; margin-left: auto; width: 945px; float: left; } #footer { height: 35px; margin-right: auto; margin-left: auto; width: 945px; position: relative; padding-top: 20px } Thanks for the help.

    Read the article

  • jQueryUI selectable: can't apply theme to selected item ("ui-selected" class)

    - by Jeremy
    I am developing an application using jQueryUI. I am also using the Themeroller. I want to have as many of my styles as possible defined using the theme, so that if I need to change some styles, I simply have to create a new custom theme (or download an existing theme). I am trying to use the "selectable" interaction in jQueryUI. It is working as it should - in Firebug I can see the "ui-selected" class being applied to the element that I select. However, there is no visual cue that the item has been selected. I looked in the theme CSS file (jquery-ui-1.8rc3.custom.css, which I downloaded from the Themeroller page), and I see no declaration for the "ui-selected" class. When I downloaded jQueryUI and the theme, I checked every option, including the one for "selectable". How can I make my theme define the "ui-selected" class? Obviously, I could just create my own style declaration, but that solution is not ideal if I ever want to change the theme. I am using jQuery 1.4.2 and jQueryUI 1.8rc3.

    Read the article

  • Wordpress Not Publishing Posts To Custom Template

    - by thatryan
    I am building a theme that has a lot of custom templates, like every page. Ridiculous, but for some reason the template I made for the "postings" page is not getting the posts? I have set the post page in reading preferences, and I have set the page to use my template, but it still publishes posts to a default template. Of all the customization I built into this I did not expect the blog part to give me trouble! lol Anyone run into this kind of thing? Thank you.

    Read the article

  • Why can't WordPress create directories when uploading themes?

    - by Arman
    I can't workout how to solve this problem so wordpress would let me upload themes. I have a fresh copy of Fedora 17 installed on my dev machine. I then installed mysql using: yum install mysql mysql-server. Next I installed WordPress which also installs apache and php: yum install wordpress I can go to http://localhost/wordpress and see WordPress working. But when I try tried to install my theme it asked for ftp credentials. I then updated the wp-config.php file and set the FS_METHOD constant to direct. Now it doesn't ask for ftp credentials but it gives me this error: Could not create directory. /usr/share/wordpress/wp-content/themes/my-theme-name/ httpd service is running under 'apache' user and 'apache' group. The /usr/share/wordpress/ directory is recursively own by 'apache' user and 'apache' group too. I've even set the permissions to 777 (also recursively) and even then I keep getting the same error as above. How can I solve this problem?

    Read the article

  • Showing recent post from a specific category

    - by kwek-kwek
    I wanted to show post from just recent post from a specific categories so far this is what I have but: <ul> <?php $number_recents_post = 5; $recent_posts = wp_get_recent_posts($number_recents_post); foreach($recent_posts as $post){ echo '<li><a href="' . get_permalink($post["ID"]) . '" title="Look '.$post["post_title"].'" >' . $post["post_title"].'</a> </li> '; } ?> </ul> I tried turning it into this but not working <ul> <?php $number_recents_post = 5; $recent_posts = wp_get_recent_posts($number_recents_post . 'cat=3,4,5'); foreach($recent_posts as $post){ echo '<li><a href="' . get_permalink($post["ID"]) . '" title="Look '.$post["post_title"].'" >' . $post["post_title"].'</a> </li> '; } ?> </ul> Please let me know what am I doing wrong....

    Read the article

  • Wordpress nav not visible in pages like articles, blog & search

    - by kwek-kwek
    My wordpress*(a custom template)* nav is all working on all of the pages but now I found out that the Main nav doesn't show on this pages All pages e.g. search.php, single.php, index.php, page.php all has <?php get_header(); ?> I really don't know whats wrong. Here is the code for my header.php <?php /** * @package WordPress * @subpackage Default_Theme */ ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes() ?>> <head> <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" /> <title><?php bloginfo('name'); ?> <?php wp_title(); ?></title> <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen,projection" /> <link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/css/sifr.css" type="text/css" /> <script src="<?php bloginfo('template_url'); ?>/js/sifr.js" type="text/javascript"></script> <script src="<?php bloginfo('template_url'); ?>/js/sifr-config.js" type="text/javascript"></script> <script src="http://cdn.jquerytools.org/1.1.2/jquery.tools.min.js"></script> <?php wp_head(); ?> </head> <?php $current_page = $post->ID; $parent = 1; while($parent) { $page_query = $wpdb->get_row("SELECT post_name, post_parent FROM $wpdb->posts WHERE ID = '$current_page'"); $parent = $current_page = $page_query->post_parent; if(!$parent) $parent_name = $page_query->post_name; } ?> <body id="<?php echo (is_page()) ? "$parent_name" : ((is_home()) ? "blog" : ((is_search()) ? "other" : ((is_single()) ? "blog" : "blog"))); ?>"> <div id="BGtie"> <!--HEAD WRAPPER--> <div id="headwrapper"> <!--HEADER--> <div id="headContainer"> <div id="nameTag"> <a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a> </div> <!--TOP NAV--> <div id="topNav"> <ul> <li><a href="<?php bloginfo('url'); ?>home">Home</a></li> <li><a href="#">Request info</a></li> <li><a href="#">Contact us</a></li> <?php do_action('icl_language_selector'); ?> </ul> </div> <!--END TOP NAV--> <!--MAIN NAV--> <?php if ( is_page() AND (strtolower(ICL_LANGUAGE_CODE) == 'fr') ) {include("main-nav-fr.php");} ?> <?php if (is_page() AND (strtolower(ICL_LANGUAGE_CODE) == 'en')) include("main-nav-en.php") ?> <!--END MAIN NAV--> </div> <!--END HEADER--> </div> <!--END HEAD WRAPPER--> </div>

    Read the article

  • Rookie PHP question

    - by Thomas
    I am hacking together a theme for wordpress and I am using the following code to pull out data from a custom field with several values: <?php $mykey_values = get_post_custom_values('services'); foreach ( $mykey_values as $key => $value ) { echo "<span>$value, </span>"; } ?> I use a comma to seperate the results, but I don't want a comma after the last result. How do I get around this?

    Read the article

  • Wordpress Post # of #

    - by Wes
    I'm looking for an easy way to assign a post number to each post in wordpress and display it out of the total number of posts. A little info: There will be about 100 "posts", each on its own page I want users to click through each post, so start at post 1 and click "next post" to get to post 2 I want it to say post 4/100 at the top for each post I want the URL to have the post name in it I was going to use WP-PageNavi and set each page to display 1 post, however I need the url to show /post-name/ and not /page/2/ I know I can count total number of posts pretty easily, any idea how I can assign a number to each post without having to do it manually? I'd like to sort by date added.

    Read the article

  • How do you separate the template of a blog block in Drupal?

    - by Ralph
    Hi, In Drupal, I created a block using views. This block contains the latest blog entries. I've placed this on a specific page to display it as an archive. Now, as for the blog itself (for example when one of them is clicked), A blog template for it depends on node-blog.tpl.php. My problem is, when I style node-blog.tpl.php, the block I created for the archives (as it displays on the page) gets affected. For example if I add TEST on node-blog.tpl.php, I will also get that on the block for every entry. I think it's because it is associated to a blog entry? What I want is to have node-blog styled "alone" when blog entries are viewed individually and not get the other entries on the blocks on the archive page be affected. How should I do this?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9  | Next Page >