I’ve been trying to code a query post into the site’s index.php so that the ‘news’ category shows up in the ‘news feed’ – with all other categories excluded. The category ID=1 for ‘news’.
This idea worked perfectly for me on another theme, but this time it throws up an ‘syntax error on line 25’ of Index.php – I could do with some expert advice on solving this. Maybe I need to sort out the line spacing, maybe a stray/missing bracket? Any tips on fixing this code would mean a lot.
[Code moderated as per the Forum Rules. Please use the pastebin]
]]>I have been trying to extend the functionality and add a second button in the menu, to show pages. I tried copying (& changing the ID of course) of the trigger function used for categories. Unfortunately, the function is not correct. I changed the name to triggerPageID and obviously there’s no such thing.. It looks wierd though, as the function keeps calling the Categories IDs. I’ve copy-pasted the function.js content below:
jQuery(document).ready(function() {
// easy toggle for categories
jQuery('#triggerCatID').click(function() {
jQuery(this).toggleClass('focus');
jQuery('#headerStrip').animate({ height: 'toggle', opacity: '100'}, 100);
return false;
});
jQuery('#triggerCatID2').click(function() {
jQuery(this).toggleClass('focus');
jQuery('#footerStrip').animate({ height: 'toggle', opacity: '100'}, 100);
return false;
});
jQuery('#triggerPageID').click(function() {
jQuery(this).toggleClass('focus');
jQuery('#footerStrip').animate({ height: 'toggle', opacity: '100'}, 100);
return false;
});
});
Any idea how can this be fixed? Do you have any reading recommendations?
Many thanks in advance.
]]>Can you please help me fix it?
I need the list of cats to be shown in one row, one after the other, and not in a one column & 4 rows list.
See original navigation here: https://www.mediasinfo.ro
]]>I looked in the index.php but the function used there is:
<div id="post-<?php the_ID(); ?>" class="post">
<div class="postMeta">
<p class="container">
<span class="date"><?php the_time('M j, Y') ?></span>
<span class="comments"><?php comments_popup_link('0', '1', '%'); ?></span>
</p>
</div>
<h2><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title() ?></a></h2>
<div class="entry">
<?php the_content('Read the rest of this entry »'); ?>
</div>
</div>
<?php endwhile; ?>
I’ve searched for the function used and I haven’t found any of the customizations I needed. Maybe the function is deprecated?
Many thanks to people who take the time to help me with an answer.
]]>How would I go about switching the header? Is there an easier way of doing things, or should I just keep playing with the css and hope I get somewhere? Thanks
]]>I’m using the WP125 plugin (sidebar widget) w/Grid Focus theme.
Something, somewhere, in some CSS (either the themes or the plugins CSS) is adding a border to the WP125 images.
(See “FEATURED POSTS” in RH column: https://www.touchingharmstheart.com
I need help removing that border! Many thanks for any insight.
]]>This is the code:
#masthead {
padding:15px 0;
background:url(https://blog.commonpeople.sg/wp-content/uploads/2009/04/commonpeoplelogo.jpg) top left no-repeat;
height: 71px;
}
]]>I am using the Grid Focus theme, and this is a link to my blog. I would like to put the MAIN button next to the SUBSCRIBE one.
This is the php
<?php
/**
* @package WordPress
* @subpackage Grid_Focus
*/
?>
<div class="navStripWrapper">
<ul class="nav fix">
<li><a href="<?php echo get_settings('home'); ?>/" title="HOME">HOME<br /><span>Frontpage</span></a></li>
<li><a id="triggerCatID" href="#" title="Show categories">Browse<br /><span>By topic</span></a></li>
<li class="last"><a href="<?php bloginfo('rss2_url'); ?>" title="Subscribe to the main feed via RSS">Subscribe<br /><span>RSS feed</span></a></li>
<li id="searchBar1" class="searchField">
<div>
<form method="get" id="searchForm1" action="<?php bloginfo('home'); ?>/">
<span><input type="text" value="Search the archives..." onfocus="if (this.value == 'Search the archives...') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Search the archives...';}" name="s" id="s1" /></span>
</form>
</div>
</li>
</ul>
<div id="headerStrip" class="toggleCategories fix" style="display: none;">
<ul class="fix">
<?php wp_list_cats('sort_column=name&optioncount=0&exclude=10, 15'); ?>
</ul>
</div>
</div>
]]>