Chris Whiteley
Forum Replies Created
-
Forum: Hacks
In reply to: Conditional Statements in Functions.phpI gave your suggestion a try, but the function still fires no matter what the author ID is. I’ve confirmed the correct ID.
Is this not working because I am running this in functions.php instead of a theme page?
Forum: Hacks
In reply to: Conditional Statements in Functions.phpThanks for responding!
I’m not exactly sure I fully understood your suggestion. I tried to interpreting it as this:function auto_cat_remove() { global $post; $authorID = get_the_author_meta('ID'); if(!$authorID = 21) { wp_schedule_single_event( time() + 20, 'remove_news_cat_event', array( $post->ID ) ); } }
But it was not successful. The function still fires not matter what author created the post.
Forum: Fixing WordPress
In reply to: Partial Database Upload of Posts and CommentsIt appears that I tried to over think and over complicate a very simple issue. The WordPress exporter allows the posts to be exported from specific date ranges. The post export also includes comments.
Forum: Fixing WordPress
In reply to: Partial Database Upload of Posts and CommentsIf I added the new posts first, and then added in the comments would that overcome any ID issue? I’m presuming that if I import the new posts through PhpMyAdmin that they would have the same ID?
Is that accurate?
Forum: Networking WordPress
In reply to: Sharing Page Content Across Networked InstallThanks Andrea,
I appreciate your help and pointing me in the right direction.
I did dig up this article which I think will help me achieve what my client has requested: https://www.bigbigtech.com/2009/07/wordpress-mu-cross-posting-with-switch_to_blog/
Forum: Networking WordPress
In reply to: Sharing Page Content Across Networked InstallThanks Andrea,
I will see if I can apply those ideas for my site. The challenge I have is that 5 of the nav items are global, but 2 of them are unique to each subsite. Also I am not sure how the snippet you sent works but I presume it duplicates the parent blog navigation which would have the user switching between main site and subsite. The main site and subsite will have a different theme, so from a visual standpoint this may not work (of course I haven’t tested yet, I am just guessing as to how the snippet works, please correct me if I am wrong)
This is why originally I wanted to create a unique template page for each of the subsite pages where I just queried the page from the main site to pull in the content.
Forum: Fixing WordPress
In reply to: Creating the Parent Category as a Link when using the_categoryAgain esmi, your help has been awesome. Thanks a billion.
I had a few problems with the snippet that you presented me with but made a few edits with my super limited php skills and came up with this:
<?php foreach((get_the_category()) as $childcat) { $parentcat = $childcat->category_parent; if( $parentcat != 0 ) echo '<a href="' . get_category_link($parentcat) .'">' .get_cat_name($parentcat) .'</a>'; else echo '<a href="' . get_category_link($childcat) .'">' .$childcat->cat_name .'</a>'; } ?>
Forum: Fixing WordPress
In reply to: Creating the Parent Category as a Link when using the_categoryThanks esmi,
The code you provide worked exactly as I needed it to. The only problem is that original code I provided work fine in a category that has children. If the category is a childless parent then nothing is diplayed. I imagine there may be some kind of if statement that could be created, however as before my PHP skills are somewhat non existant. Any thoughts on how to do this
also as a sidenote the echo was missing an opening quotation mark. Here is the corrected code for those who may need it
<?php foreach((get_the_category()) as $childcat) { $parentcat = $childcat->category_parent; echo '<a href="' . get_category_link($parentcat) .'">' .get_cat_name($parentcat) .'</a>'; } ?>
Forum: Plugins
In reply to: Does Akismet work retroactively?Great! Thank you very much
Forum: Themes and Templates
In reply to: Remove the ‘»’ from the sidebar of the default templateSorry about not posting the link, here it is: https://livingonadsense.com/testblog/
As for the ? being used as a bullet, this is not the case. In the CSS the list-style-type is set to none, and when I remove this CSS element the actual bullet points are being displayed.
This is from the default Kubrick theme, so I imagine someone has encountered this problem before. I just cannot find where they are being referenced. I have downloaded the entire site and used Dreamweaver to search for both ? and for » with no results.