Forum Replies Created

Viewing 15 replies - 1 through 15 (of 35 total)
  • Thread Starter conor909

    (@conor909)

    Oh sh!t. Its <noscript> ?

    I had a totally different idea of what <noscript> meant

    The HTML <noscript> Element defines a section of html to be inserted if a script type on the page is unsupported or if scripting is currently turned off in the browser.

    Thread Starter conor909

    (@conor909)

    Andrew:

    I’m not working in a child theme. Its my first time using a HTML template tho. Usually I use a blank theme and develop from that. For this one, I literally took the template, changed the index to a .php file, and updated the URLs in the <head> to the template directory.

    One problem may be that wordpress needs a style.css in the theme root. I added a style.css to the root, but only included the theme template information. Would this effect my project?

    Jose:

    I am not getting 404 errors for any other file, and my javascript files (linked the exact same way) are being called correctly.

    Here is my <head> code:

    <head>
    <title>Helios by HTML5 UP</title>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <meta name="description" content="" />
    <meta name="keywords" content="" />
    <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600" rel="stylesheet" type="text/css" />
    <!--[if lte IE 8]><script src="js/html5shiv.js"></script><![endif]-->
    <script src="<?php echo get_template_directory_uri(); ?>/js/jquery.min.js"></script>
    <script src="<?php echo get_template_directory_uri(); ?>/js/jquery.dropotron.min.js"></script>
    <script src="<?php echo get_template_directory_uri(); ?>/js/skel.min.js"></script>
    <script src="<?php echo get_template_directory_uri(); ?>/js/skel-panels.min.js"></script>
    <script src="<?php echo get_template_directory_uri(); ?>/js/init.js"></script>
    <noscript>
    	<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/css/skel-noscript.css" />
    	<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/style.css" />
    	<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/css/style-desktop.css" />
    	<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/css/style-noscript.css" />
    </noscript>
    <!--[if lte IE 8]><link rel="stylesheet" href="css/ie8.css" /><![endif]-->
    </head>

    Thread Starter conor909

    (@conor909)

    Andrew, it seems get_template_directory_uri is returning:

    href="https://localhost/wordpress/wp-content/themes/helios/style.css"

    Which is what I want, but my console still reads failed to load resource “https://localhost/wordpress/css/style.css&#8221;

    Im still not calling that URL from anywhere in my project, including my Javascript files

    Thread Starter conor909

    (@conor909)

    mvieriras, thanks for your reply.

    I don’t want to put the entire path because I’m working locally. I have a lot of URLs within the project and would like it to be more dynamic. Besides, I dont see why this shouldnt work.

    Thread Starter conor909

    (@conor909)

    24 hours later I finally got it to work, for anyone interested in displaying the featured image of a post as the first (active) image in the bootstrap carousel, and the rest of the embedded images of the post to follow:

    <div class="carousel-inner">
    	<?php
    
    	echo '<div class="item active">';
        echo get_the_post_thumbnail( $post_id, 'full');
        echo '</div>';
    
        $thumb_ID = get_post_thumbnail_id( $post->ID );
    
    	$args = array(
    	   'post_type' => 'attachment',
    	   'numberposts' => -1,
    	   'post_status' => null,
    	   'post_parent' => $post->ID,
    	   'exclude' => $thumb_ID,
    	);
    
    	  $attachments = get_posts( $args );
    	     if ( $attachments ) {
    	        foreach ( $attachments as $attachment ) {
    	           echo '<div class="item">';
    	           echo wp_get_attachment_image( $attachment->ID, 'full' );
    	           echo '</div>';
    	          }
    	     }
    
    	?>
    </div>
    Thread Starter conor909

    (@conor909)

    Thanks very much for all that information, I’ll definitely clean up my template and take all that into consideration for next projects.

    Although, I am worried that once I do all that, my sidebar will still not sit flush to the top of the page. Because before, if i added 3 divs (the number of posts on the page). It would fix it and sit nicely to the top of the page and on the right.

    Thread Starter conor909

    (@conor909)

    Oh thanks! ..Sorry I dont do this kind of thing to often as you have probably worked out.

    But still I havnt got it to work yet! Any suggestions??

    Thread Starter conor909

    (@conor909)

    Thanks for pointing all that out Frank! Really appreciate it.

    So I (think) have fixed all the problematic divs, I’v fixed the , and I’v kept my <body> all on one line although I have some php code in there also. I still cant figure it out. I’ll post my header and footer so people can see the full page at work..

    Header:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="https://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
    <head profile="https://gmpg.org/xfn/11">
        <title>The Wellness Nomad</title>
    
        <meta http-equiv="content-type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
    
        <link rel="stylesheet" type="text/css" href="<?php bloginfo('stylesheet_url'); ?>" />
    
        <link rel="alternate" type="application/rss+xml" title="RSS 2.0 Feed for Posts from my site (the main feed)" href="<?php bloginfo('rss2_url'); ?>" />
    	<link rel="alternate" type="application/atom+xml" title="Atom 0.3 - <?php bloginfo('name'); ?> " href="<?php bloginfo('atom_url'); ?>" />
    	<link rel="alternate" type="application/rss+xml" title="Comments Feed - for all the comments on this site" href="<?php bloginfo('comments_rss2_url'); ?>" />
    
        <?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>
    
        <?php wp_head(); ?>
    
        <link rel="alternate" type="application/rss+xml" href="<?php bloginfo('rss2_url'); ?>" title="<?php printf( __( '%s latest posts', 'thewellnessnomad' ), wp_specialchars( get_bloginfo('name'), 1 ) ); ?>" />
        <link rel="alternate" type="application/rss+xml" href="<?php bloginfo('comments_rss2_url') ?>" title="<?php printf( __( '%s latest comments', 'thewellnessnomad' ), wp_specialchars( get_bloginfo('name'), 1 ) ); ?>" />
        <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />  
    
    <!-- include jQuery library -->
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
    <!-- include Cycle plugin -->
    <script type="text/javascript" src="https://cloud.github.com/downloads/malsup/cycle/jquery.cycle.all.latest.js"></script>
    <script type="text/javascript">
    $(document).ready(function() {
        $('.slideshow').cycle({
    		fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
    	});
    });
    </script>
    
    </head>
    
    <body <?php if ( is_page(array('rebecca', 'connect', 'philosophy', 'philanthropy', 'consulting', 'retreats'))) { echo ' class="pageclass2" ';} ?>>
    
    <div id="fb-root"></div>
    <script>(function(d, s, id) {
      var js, fjs = d.getElementsByTagName(s)[0];
      if (d.getElementById(id)) return;
      js = d.createElement(s); js.id = id;
      js.src = "//connect.facebook.net/en_GB/all.js#xfbml=1";
      fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));</script>             
    
    <div id="wrapper" class="hfeed">
        <div id="header">
            <div id="masthead">
    
               <div id="branding">
               <div id ="logo">
               <a href="https://www.thewellnessnomad.com"><img id="slide-img-1" src="<?php echo get_bloginfo('template_directory');?>/images/logo.jpg" class="img" alt="The Wellness Nomad" /></a>
               </div><!--logo-->
    
               <div id="headrightdiv">
    
                <div id="tagline">
                <img id="slide-img-1" src="<?php echo get_bloginfo('template_directory');?>/images/tagline.jpg" class="img" alt="" />
                </div>
    
                <div id="socialdiv">
    			 <a href="https://www.facebook.com/pages/The-Wellness-Nomad/400894396625980" target="_blank"><img id="socialbutton" src="<?php echo get_bloginfo('template_directory');?>/images/facebook.jpg" class="img" alt="" /></a>
                 <a href="mailto:[email protected]"><img id="socialbutton" src="<?php echo get_bloginfo('template_directory');?>/images/email.jpg" class="img" alt="" /></a>
                 </div><!--socialdiv-->
    
                <div id="formdiv">
    
                <?php
    if (!empty($_POST[email]))
    {
      $con = mysql_connect("xxxxxxxxxxxxx.xxxxxxxxxx.com","xxxxxxxxxxxxxx","xxxxxxxxxxxxxxxxxxxx");
      if (!$con)
      {
        die('Could not connect: ' . mysql_error());
      }
      mysql_select_db("contacts", $con);
    
      $sql="INSERT INTO contacts (email)
    VALUES
    ('$_POST[email]')";
    
      if (!mysql_query($sql,$con))
      {
        die('Error: ' . mysql_error());
      }
      //echo "Your Signed Up";
    
      mysql_close($con);
    }
    ?>
                <script type="text/javascript">
    function validateForm()
    {
    var x=document.forms["myForm"]["email"].value;
    var atpos=x.indexOf("@");
    var dotpos=x.lastIndexOf(".");
    if (atpos<1 || dotpos<atpos+2 || dotpos+2>=x.length)
      {
      alert("Not a valid e-mail address");
      return false;
      }
    }
    
    </script>
                <!--<script type="text/javascript">
    			function make_blank()
    			{
    			document.form1.type.value ="";
    			}
    			</script>	-->
    
                <span style="color:#66cccc">stay connected</span><br/>
    
                <form name="myForm" action="thanks" onsubmit="return validateForm();" method="post">
    
    			<div id="formwrap" style="position:relative; border:1px solid 999; width:127px;">
    
    			<div id="input">
    			<input type="text" name="email" value='enter email' onclick="make_blank();">
    			</div><!--input-->
    
    <div id="button" style="position:absolute; right:0px; top:0px;">
    
    <input type="submit" value="">
    
    </div><!--button-->
    
    			</div><!--formwrap-->
    
                </form>
    
                <!--<form name=form1 method=post action=''>
    			<input type=text name=type value='enter email' onclick="make_blank();">
    
    			</form>
                </div>form-->
    
               </div><!--headrightdiv-->
               </div><!-- #branding -->
    
                <div id="access">
                   <?php wp_nav_menu( array( 'menu' => 'about') ); ?>
    
                <?php wp_nav_menu( array( 'menu' => 'Other Offers', 'items_wrap' => '<ul><li id="item-id"><span style="color:#999;">Other Offerings</span></li>%3$s</ul>' ) ); ?>
    
                </div><!-- #access -->
    
            </div><!-- #masthead -->
        </div><!-- #header -->
    
    <div id="main">

    Index:

    <?php get_header(); ?>
    
        <div id="container">
    
        <div id="index-content">
    
        <?php while ( have_posts() ) : the_post() ?>
    
        <div id="blog-left" style="border-top:1px solid #66cccc;">
    
        <div id="rss" style="float:right; padding:10px 65px 0px 0px">
    
    <!-- FACEBOOK BUTTON REMOVED 21st OCTOBER 2012
         <div class="fb-like" data-href="https://www.thewellnessnomad.com" data-send="false" data-layout="button_count" data-width="400" data-show-faces="false" style="padding-right:20px;"></div>
    -->
    
        <a href="<?php bloginfo('rss2_url'); ?>" title="<?php _e('Syndicate this site using RSS'); ?>"><img src="<?php echo get_bloginfo('template_directory');?>/images/rss.jpg" class="img" alt="" /></a>
    
        </div><!--rss-->
    
        <div id="blog-content-title" style="font-style:italic; padding-left:60px; padding-top:40px; color:#66cccc; width:695px;">
    	<?php echo get_the_title(); ?> <span style="color:#555353;"><br/>
    
        posted by Rebecca Walker  |  <?php the_date(); ?></span>
        </div>
    
        <div id="blog-content" style="clear:both; padding-left:60px; width:630px; "><?php the_content(); ?>
        </div>
    
        </div><!--blog-left -->
    
        <?php endwhile; ?>
    
        </div>
    
        <div id="sidebar">     
    
        <div id="blog_sidebar" style="padding-top:30px;">
    
        <ul class="sideul">
        <li style="font-size:14px; color:#66cccc; padding:0px; padding-bottom:10px;">Categories</li>
        <?php echo get_the_category_list(); ?>
        </ul>
    
        <ul class="sideul" style="padding-bottom:13px;">
        <?php get_links_list(); ?>
        </ul>
    
        <ul class="sideul">
        <li style="font-size:14px; color:#66cccc; padding:0px; padding-bottom:10px;">Archive</li>
        <?php wp_get_archives('type=monthly&limit=12'); ?>
        </ul>
    
        <!--</div> blog_sidebar-->  
    
        </div> <!--catlist-->
    
        </div><!--sidebar--> 
    
        <?php get_footer(); ?>

    Footer:

    </div> <!--#main-->
    <div id="footer">
            <div id="colophon">
                <div id="site-info">
                <p>Copyright  ? 2012 The Wellness Nomad. All Rights Reserved.</p>
                </div><!-- #site-info -->
            </div><!-- #colophon -->
        </div><!-- #footer -->
    </div><!-- #wrapper -->
    </body>
    </html>

    [ Moderator note: DB credentials removed. Please don’t post passwords and usernames on public forums ]

    Thread Starter conor909

    (@conor909)

    Hi Alchymyth,

    I really appreciate you taking a look at this for me. Although it hasnt fixed my problem, here is a link to the blog I’m working on so you can see what I’m trying to achieve.

    https://thewellnessnomad.com/blog/

    As you can see the sidebar is way down at the bottom of my page. I want it to be running along the top, flush with the top green line border.

    I’v played around with your suggested code but I cant get it right. I do think your on the right track tho, it must be something about closing the right number of divs before and after the loop.

    Thread Starter conor909

    (@conor909)

    Sorry here is my current code. Thanks!

    <?php get_header(); ?>
    <div id="container">
    
        <div id="index-content">
    
    	<?php while ( have_posts() ) : the_post() ?>
    
        <div id="blog-left" style="border-top:1px solid #66cccc;">
    
        <div id="rss" style="float:right; padding:10px 65px 0px 0px">
    
    <!-- FACEBOOK BUTTON REMOVED 21st OCTOBER 2012
         <div class="fb-like" data-href="https://www.thewellnessnomad.com" data-send="false" data-layout="button_count" data-width="400" data-show-faces="false" style="padding-right:20px;"></div>
    -->
    
        <a href="<?php bloginfo('rss2_url'); ?>" title="<?php _e('Syndicate this site using RSS'); ?>"><img src="<?php echo get_bloginfo('template_directory');?>/images/rss.jpg" class="img" alt="" /></a>
    
        </div><!--rss-->
    
        <div id="blog-content-title" style="font-style:italic; padding-left:60px; padding-top:40px; color:#66cccc; width:695px;">
    	<?php echo get_the_title(); ?> <span style="color:#555353;"><br/>
    
        posted by Rebecca Walker  |  <?php the_date(); ?></span>
    
        </div>
    
        <div id="blog-content" style="clear:both; padding-left:60px; width:630px; "><?php the_content(); ?>
        </div>
    	<?php endwhile; ?>
    
    </div></div></div>
        <!--blog-left  NEED TO ADD A DIV FOR EVERY POST  -->
    
        <div id="sidebar">     
    
    <div id="blog_sidebar" style="padding-top:30px;">
    
    	 <ul class="sideul">
         <li style="font-size:14px; color:#66cccc; padding:0px; padding-bottom:10px;">Categories</li>
         <?php echo get_the_category_list(); ?>
         </ui>
    
          <ul class="sideul" style="padding-bottom:13px;">
    		<?php get_links_list(); ?>
    	 </ul>
    
          <ul class="sideul">
         <li style="font-size:14px; color:#66cccc; padding:0px; padding-bottom:10px;">Archive</li>
         	<?php wp_get_archives('type=monthly&limit=12'); ?>
         </ul>
    
       </div><!--blog_sidebar-->  
    
         </div> <!--catlist-->
    
     	</div><!--sidebar--> 
    
        </div> 
    
    <?php get_footer(); ?>

    Thanks for the info webbrewers.

    I also sovled my issue where sometime the colour was what I wanted and sometimes not, within the same post.

    The answer is that I was making the quoted text italic at the same time as setting a different colour. Sometime the italic html tags where inside the span color tags, and sometime outside, depending on the order of which I made the settings from the admin panel. It seems the color only works if its within the italic html tags.

    So my none code savvy client has to remember to set the colour first, then format it the text.

    Hey webbrewers,

    I’m having the same issue, but its working on some pages, and not on others. Bit strange I think.

    Can you explain what you mean by ‘pasting in the correctly formatted code in the file’.

    What I’m trying to do is change the color of Blockquoted text only. Where would I paste that code and into what file?

    (I’m kind of new to wordpress but I’m ok at html and css. I know I can put the color I want into the .blockquote css in my theme stylesheet, but for future reference if the admin panel stuff wasnt working for my client to update, I’d like to know where to look and what file to fix up)

    any help is appreciated

    Thread Starter conor909

    (@conor909)

    I have resolved this issue. Thanks to everyone for replying. If you want to see my simple fix, visit my other post here..

    https://www.ads-software.com/support/topic/resizing-page-height-on-each-page-in-relation-to-size-of-wp-post?replies=9

    Thread Starter conor909

    (@conor909)

    I have resolved this issue. If you want to see my simple fix, visit my other post here..

    https://www.ads-software.com/support/topic/resizing-page-height-on-each-page-in-relation-to-size-of-wp-post?replies=9

    Thread Starter conor909

    (@conor909)

    I had to contact my hosts to remove the files for me. Although its problem solved, its very time consuming. If anyone has a better solution, feel free to share it!

Viewing 15 replies - 1 through 15 (of 35 total)