Forum Replies Created

Viewing 13 replies - 1 through 13 (of 13 total)
  • Thread Starter atrag

    (@atrag)

    Still not working. Any help please?

    Forum: Fixing WordPress
    In reply to: No WP Toolbar?
    Thread Starter atrag

    (@atrag)

    Its a live site with 1 million visitors per month. I guess I would have to make a copy of the site to do that. I am not sure its worth it. Thank you anyway.

    Thread Starter atrag

    (@atrag)

    Can you clarify what you mean by “work”?? I want it to work differently to the normal, sure, but I don’t think what I want to do is technically impossible. I must have seemed like an idiot to you. Let me explain:

    I am working on a site with around 1 million visitors per month. It has around 13000 seperate html files and no content manager. We havent the resources to immediately transpose the entire site to wordpress but we want a large number of pages to be generated by wordpress as posts. This can be done by custom permalinks that correspond to the fixed html pages, I believe. My problem is that if I install wordpress in the root, will it change the homepage from the index.html file? If so, how can I stop this.

    Thank you.

    Thread Starter atrag

    (@atrag)

    Thank you for the reply but I want to keep the correct index.html as the home page for now. Is that possible?

    Thread Starter atrag

    (@atrag)

    Please somebody help. I am supposed to be working on this but for the second day I am sat doing nothing. Here is another error to add to the mystery:

    Fatal error: Cannot redeclare commandline_init() (previously declared in D:\Plesk\VHOSTS\sparklebox.co.uk\httpdocs\wordpress\wp-content\themes\sparklebox\functions.php:6) in D:\Plesk\VHOSTS\sparklebox.co.uk\httpdocs\wordpress\wp-content\themes\sparklebox\functions.php on line 14

    This appears when functions.php contains the following code:

    
    function commandline_init() {
    // create a new taxonomy
    register_taxonomy(
    ‘commandline’,
    ‘post’,
    array(
    ‘label’ => __( ‘Command Line’ ),
    ‘rewrite’ => array( ‘slug’ => ‘commandline’ ),
    
    )
    );
    }

    I have to say, I am very disappointed with the support from WordPress on this. This the official forum. Where else can I ask?

    Thread Starter atrag

    (@atrag)

    I am an idiot. Thank you 😉

    Thread Starter atrag

    (@atrag)

    Now resolved. There was a top margin of 50px defined only for .ul. It wasnt showing on chrome.

    Thread Starter atrag

    (@atrag)

    Thank you for replying. The toggleme div IDs are undefined. I should probably delete them.

    Forum: Fixing WordPress
    In reply to: get_the_terms
    Thread Starter atrag

    (@atrag)

    That works great. Thank you.

    Thread Starter atrag

    (@atrag)

    Great. That saves me having to delete it (maybe it is useful for something!). Thanks a lot. This is the second issue you’ve helped me with.

    Thread Starter atrag

    (@atrag)

    Thank you Michael for the reply. I cant find wpex_sidebar_display in functions.php. I have been through every php file contained in the theme’s folder and subfolder and cant find where its defined. I did find a sidebar-display.php in a folder labelled functions. The code is:

    <?php
    
    if ( ! function_exists( 'wpex_sidebar_display' ) ) {
    	function wpex_sidebar_display() {
    		if ( is_singular() ) {
    			return true;
    		}
    	} // End function
    } // End if

    Does this give any clue?

    In any case, now changed the sidebar-secondary.php to omit the function that seems not to exist:

    `
    <aside id=”secondary-sidebar” class=”sidebar-container” role=”complementary”>
    <div class=”widget-area clr”>
    <?php dynamic_sidebar( ‘secondary-sidebar’ ); ?>
    </div>
    </aside><!– #secondary-sidebar –>

    Now it shows the sidebar but it doesnt fit next to it! I guess this is a problem with the CSS that I will hopefully be able to fix.

    The theme is Magtastico WPExplorer Theme and I got it from WPExplorer.com. I only started learning about WordPress and php a few days ago (now I am spending all the free time I have learning more!) and find it really frustrating trying to figure out how the theme works. The site describes it as “well documented” but when I paid and downloaded the files all there was was a readme.txt with a two line thank you message!

    Thread Starter atrag

    (@atrag)

    Category.php. (Sorry its a bit messy…):

    get_header(); ?>
    
    <?php $current_cat = single_cat_title("", false); ?>
    
    	<div id="primary" class="content-area clr">
    		<div id="content" class="site-content left-content clr" role="main">
    			<header class="archive-header clr">
    				<h1 class="archive-header-title"><?php
    
    $my_referrer = wp_get_referer();
    if( $my_referrer ) {
    echo 'The referrer is: ' . $my_referrer;}
    if (strpos($my_referrer, 'grade') !== false) {
        echo 'true';} 
    
    ?>
    
    </h1>
    								<img src="<?php bloginfo('template_directory'); ?>/images/grade1title.png" width="100%"/>
    
    				<?php if ( term_description() ) { ?>
    					<div class="archive-description clr">
    						<?php echo term_description(); ?>
    
    					</div><!-- #archive-description -->
    
    				<?php } ?>
    			</header><!-- .archive-header -->
    			<?php
    
    		$currentURL = add_query_arg();
    	 echo "$currentURL";?>
    
    <br>
     <?php if (strpos($currentURL, 'grade') !== false) {
        $wherefrom = "category";
    	}
    	elseif (strpos($currentURL, 'topic') !== false) {
    		$wherefrom = "tag";
    	 	}
    		?>
    
    	  	<?php	echo "$current_cat"; ?>
    
    	<?php	echo "$wherefrom"; ?>
    
    </div><!--end column-wrap-->
    
    			<img src="<?php bloginfo('template_directory'); ?>/images/newresources.png" width="100%"/>
    
    							<?php $query = new WP_Query( array ('category_name' => $current_cat, 'date_query' => array(
         array(
               'after' => '24 hours ago'
               )
    			)
    			)
    			);
    			?>				
    
    			<?php if ($query->have_posts() ) : ?>
    
    				<div id="blog-wrap" class="clr masonry-grid">
    
    					<?php
    					// Begin loop
    					while ($query->have_posts() ) : $query->the_post();
    						get_template_part( 'content', get_post_format() );
    					endwhile; ?>
    				</div><!-- #blog-wrap -->
    				<?php wpex_get_pagination(); ?>
    			<?php else : ?>
    				<?php get_template_part( 'content', 'none' ); ?>
    			<?php endif; ?>
    			<?php if ( term_description() ) { ?>
    					<div class="archive-description clr">
    						<?php echo term_description(); ?>
    					</div><!-- #archive-description -->
    				<?php } ?>
    
    			</header><!-- .archive-header -->
    													<img src="<?php bloginfo('template_directory'); ?>/images/allresources.png" width="100%"/>
    
    		<?php $query2 = new WP_Query( array (
    'meta_key' => 'wpb_post_views_count', 'orderby' => 'meta_value_num', 'order' => 'DESC',
    'category_name' => $current_cat,
    
    		'date_query' => array(
         array(
               'before' => '24 hours ago'
               )
    			)
    			)
    		);  ?>
    
    			<?php if ($query2->have_posts() ) : ?>
    
    				<div id="blog-wrap" class="clr masonry-grid">
    
    					<?php
    					// Begin loop
    					while ($query2->have_posts() ) : $query2->the_post();
    						get_template_part( 'content', get_post_format() );
    					endwhile; ?>
    				</div><!-- #blog-wrap -->
    				<?php wpex_get_pagination(); ?>
    			<?php else : ?>
    				<?php get_template_part( 'content', 'none' ); ?>
    			<?php endif; ?>
    
    		</div><!-- #content -->
    		<?php get_sidebar( 'secondary' ); ?>
    	</div><!-- #primary -->
    
    <?php get_footer(); ?>

    sidebar-secondary.php:

    if ( is_active_sidebar( 'secondary-sidebar' ) && wpex_sidebar_display() ) { ?>
    	<aside id="secondary-sidebar" class="sidebar-container" role="complementary">
    		<div class="widget-area clr">
    			<?php dynamic_sidebar( 'secondary-sidebar' ); ?>
    		</div>
    	</aside><!-- #secondary-sidebar -->
    <?php } ?>

    Thank you.

    Thread Starter atrag

    (@atrag)

    Thank you so much for your reply. Looking at the category parameters I see where I went wrong. I was defining it by:

    <?php $current_cat = single_cat_title("", false); ?>

    So now I have changed the parameter in WP_Query to ‘category_name’ instead of ‘cat’ it works fine.

Viewing 13 replies - 1 through 13 (of 13 total)