Forum Replies Created

Viewing 15 replies - 1 through 15 (of 31 total)
  • With your code it worked in Mozilla, but not in IE 8.

    Did not understand why you if and endif codes are inside
    <!--[ ]-->

    Am I suppose to replace those with <?php ?> ?

    Thread Starter aichandmokie

    (@aichandmokie)

    Cool!

    When using
    <?php wp_reset_query(); ?>

    after

    <?php endif; ?>

    it fixed so that is_home now works on my frontpage button. !

    Cool – thanks for the help peepz.

    Thread Starter aichandmokie

    (@aichandmokie)

    Is there something I could code in beneath the recent post in my home.php to avoid the category button to show active?

    Figured this one out, with this code.

    <?php wp_reset_query(); ?>

    But I still can’t get my frontpage button to show active when I’m on my frontpage.

    Tried is_home

    Thread Starter aichandmokie

    (@aichandmokie)

    That did not work.

    Maybe because my front page doesn’t have an ID…?

    Is there something I could code in beneath the recent post in my home.php to avoid the category button to show active?

    Same problem!

    Any one with a suggestion?

    aichandmokie

    (@aichandmokie)

    I can’t seem to understand how to use this.

    What does the function do? As I am also looking for an automatic PDF downloadlink. An easy to use “place PDF, and the it shows as a PDF downloadable link on the post” function.

    I am not familier to the functions php codings in wordpress yet, but I am trying to learn.

    Anyone care to explain this function for me?

    Thread Starter aichandmokie

    (@aichandmokie)

    Found a plugin that made it possible ??

    https://txfx.net/wordpress-plugins/page-links-to/

    aichandmokie

    (@aichandmokie)

    Did you figure it out?

    Thread Starter aichandmokie

    (@aichandmokie)

    Seems that I managed to fix the problem by changing my hiarchi to wordpress default. With a category template, single template and page template.

    Thread Starter aichandmokie

    (@aichandmokie)

    This problem is starting to annoy me.

    I have fixed the problem on the frontpage by creating a home.php that works as an alternative frontpage, then the categories work fine, but the page ‘analyse’ and ‘kontakt’ has now the same problem as previous… I have commented out anything from the template which they are based on, and yet the sidebar appears without me telling it to.

    Need some help again, if anyone has a clue.

    It seems to be a problem with the fagartikler.php as you point out. Could you help me to locate what code I miss in order to limit fagartikler.php tp only work once?

    aichandmokie

    (@aichandmokie)

    Have the same problem now… Did you figure it out?

    Thread Starter aichandmokie

    (@aichandmokie)

    I have located the problem, but I do not know why this is a problem!

    It seems that the main category – which is undeleteable and has the ID=1 is within an automatic loop. I have now created a new category called fagartikler, and I am not using the main category (which I previous called fagartikler) and now it works. The loop is gone.

    I think it has something to do with the static front page settings, and the blog settings.

    I would very much like to find out the reason for the problem, because I do not want to have a category that can’t be used.

    Any idea?

    – Mokie

    Thread Starter aichandmokie

    (@aichandmokie)

    I have noticed that the fagartikler.php template is the one that appear unwanted. As you can see it echoes below the content which I do not want to be there.

    Meanwhile I wait for a reply from you, I will try to work with fagartikler.php and see if I can find the error there.

    Here’s the code:

    <div class="main-content">
    
        	<div id="blogg">
    
    		<?php
    		include(TEMPLATEPATH . '/sidemeny.php');
    		?>
    
    <div class="blogg-main-content">
    <div class="blogg-page">
    <?php if (have_posts()) : the_post();?>
    
    <h2><?php the_title (); ?></h2>
    
    <?php the_content()?>
    
    <p class="autoblogg"><i>Dette innlegget er skrevet av <strong><?php the_author(); ?></strong> den <strong><?php the_time('m/d/y') ?></strong>.</i></p>
    
                   <p><?php echo '<ul class="addtoany_list">'; if( function_exists('ADDTOANY_SHARE_SAVE_ICONS') ) ADDTOANY_SHARE_SAVE_ICONS( array("html_wrap_open" => "<li>", "html_wrap_close" => "</li>") ); echo '</ul>'; ?>&larr; Interessant innlegg? Del den med folk.</p>
    
                   <p><?php edit_post_link('Edit', ''); ?></p>
    
    </div>
    
    			<div id="thecomments">
    				<?php comments_template(); ?>
    			</div>
    
    <?php endif; ?>
    </div>
    
    </div>
    
        	</div>

    Thread Starter aichandmokie

    (@aichandmokie)

    I have btw changed the buttons name so that it will be easier for me to show and explain how I want the buttons to work and what page/blog they should show.

    – Mokie

    Thread Starter aichandmokie

    (@aichandmokie)

    Oh yeah. Not used to the jargon ??

    I have now commented out all the single pages – and the result is that the loop, which I don’t want there, appears on top of the footer instead of below.

    Could the problem be that in the Index file have put forside.php as a template for the homepage, and that I do not have a home.php? I also changed the settings in WordPress to use the Forsiden page as a static front page.

    Thanks for your time. Hope you got the time to work me through this.

    – Mokie

    header.php:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    
    	"https://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    
    <html xmlns="https://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
    
    	<head profile="https://gmpg.org/xfn/11">
    
    		<title>
    
    		<?php if ( is_home() ) { ?><?php bloginfo('description'); ?> - <?php bloginfo('name'); ?><?php } ?>
    
            <?php if ( is_search() ) { ?><?php echo $s; ?> - <?php bloginfo('name'); ?><?php } ?>
    
            <?php if ( is_single() ) { ?><?php wp_title(''); ?> - <?php bloginfo('name'); ?><?php } ?>
    
            <?php if ( is_page() ) { ?><?php wp_title(''); ?> - <?php bloginfo('name'); ?><?php } ?>
    
            <?php if ( is_category() ) { ?>Archive <?php single_cat_title(); ?> - <?php bloginfo('name'); ?><?php } ?>
    
            <?php if ( is_month() ) { ?>Archive <?php the_time('F'); ?> - <?php bloginfo('name'); ?><?php } ?>
    
            <?php if ( is_tag() ) { ?><?php single_tag_title();?> - <?php bloginfo('name'); ?><?php } ?>
    
            <?php if ( is_404() ) { ?>Sorry, not found! - <?php bloginfo('name'); ?><?php } ?>
    
    		</title>
    
    	    <meta http-equiv="content-type" content="<?php bloginfo('html_type') ?>; charset=<?php bloginfo('charset') ?>" />
    
    		<meta name="description" content="<?php bloginfo('description') ?>" />
    
    		<?php if(is_search()) { ?>
    
    		<meta name="robots" content="noindex, nofollow" /> 
    
    	    <?php }?>
    
    		<link rel="stylesheet" type="text/css" href="<?php bloginfo('stylesheet_url'); ?>" media="screen" />
    
    		<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />
    
    		<link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>" />
    
    		<link rel="alternate" type="application/atom+xml" title="Atom 1.0" href="<?php bloginfo('atom_url'); ?>" />
    
            <link rel="shortcut icon" href="/wp/wp-content/themes/wpesp-portfolio/favicon.ico" />
    
    		<script src="<?php bloginfo('template_url'); ?>/style/scripts/jquery-1.3.2.js" type="text/javascript" charset="utf-8"></script>
    
    		<script src="<?php bloginfo('template_url'); ?>/style/scripts/jquery.scrollTo-1.4.0-min.js" type="text/javascript" charset="utf-8"></script>
    
    		<script src="<?php bloginfo('template_url'); ?>/style/scripts/jquery.localscroll-1.2.6-min.js" type="text/javascript" charset="utf-8"></script>
    
    		<script src="<?php bloginfo('template_url'); ?>/style/scripts/jquery.serialScroll-1.2.1-min.js" type="text/javascript" charset="utf-8"></script>
    
    		<?php wp_head(); ?>
    
    	</head>
    
    	<body>
    
    		<!-- HEADER -->	
    
    		<div id="header">
    
            <div class="logo">
    
    			<h1><a href="<?php echo get_option('home'); ?>"><?php bloginfo('name'); ?></a></h1>
    </div>
    
    		</div><!-- #header -->
    
    		<!-- NAVIGATION -->
    
    		<div id="navigation">
    
    			<div id="menu">
    
    				<ol> <!-- https://codex.www.ads-software.com/Conditional_Tags -->
    
    					<li id="menufirst"><a <?php if ( is_category('fagartikler') ) { ?> class="active"<?php } ?> href="<?php echo get_option('home'); ?>/fagartikler" title="Finn ut hvem vi er">Fagartikler</a></li>
    
    					<li ><a <?php if ( is_category('presse') ) { ?> class="active"<?php } ?> href="<?php echo get_option('home'); ?>/presse" title="Kontakt oss">Presseomtale</a></li>
    
                        <li ><a <?php if ( is_page(2) ) { ?> class="active"<?php } ?> href="<?php echo get_option('home'); ?>/?page_id=2" title="Kontakt oss">Bestill en analyse</a></li>
    
    <li id="menulast"><a <?php if ( is_page(10) ) { ?> class="active"<?php } ?> href="<?php echo get_option('home'); ?>/?page_id=10" title="Tanker og funderinger">Kontakt</a></li>
    
    				</ol>
    
    				<div id="feed">
    
    					<a href="https://feeds.feedburner.com/aichogmokie?format=xml" rel="alternate" title="F?lg oss gjennom RSS"><span>Feed - RSS</span></a>
    
    				</div>
    
    			</div><!-- #menu -->
    
    		</div><!-- #navigation -->

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