rebekahford
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Thickbox repeating windows script problemI found out that it is indeed that when using thickbox in ajax/modal mode, the content that you’re calling in i.e. the single.php template in this case, should not also be calling thickbox itself somewhere, hence the never ending loop!
I have fixed this myself by doing this
1. I deactivated the plugin as i had no control as to what pages it appeared on and this was lazy anyway
2. I downloaded thickbox 3.1 from the thickbox site and uploaded the js and css files to my theme (i will be looking into shadowbox next time).
3. I added some conditionals to my header so that I could control which pages are calling thickbox. I only need the category and homepage to call it:<?php if (is_home() || is_category()) { ?> <script src="<?php bloginfo('template_directory'); ?>/js/thickbox3.1.js" type="text/javascript"></script> <script language="javascript" type="text/javascript" name="homecat_scripting"> $(document).ready(function() { //********* thickbox pop ups jQuery("li.post").parent("a").addClass("thickbox"); }); </script> <?php }?>
4. I had another conditional for the single.php template
<?php if (is_single()) { ?> only single page jquery went in here <?php }?>
thus making my header code more efficient
It now works a treat thank heavens! Hope this helps anyone else who gets this problem
Forum: Fixing WordPress
In reply to: Adding random comment excerpts to a random posts loopThat hasn’t quite answered my problem. I need to know how to call the comment excerpt from outside single.php in the first place but that piece of code is very helpful thank you
Forum: Fixing WordPress
In reply to: Adding random comment excerpts to a random posts loopthanks i’ll try that… didn’t see those examples before
Forum: Fixing WordPress
In reply to: How to exclude categories from get_the_category_list?That worked a treat and so simple! Thanks so much for your help!! ??
Forum: Fixing WordPress
In reply to: Adding code to the category links andI solved this myself if anyone’s interested:
<?php foreach((get_the_category()) as $category) { echo '<a href="' . get_category_link( $category->term_id ) . '"onclick="self.parent.tb_remove();" target="main" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . '>' . $category->name.'</a>'; ?>
this is useful if you are putting your post pages in a thickbox or shadowbox ajax overlay in iframe mode
Forum: Fixing WordPress
In reply to: How to exclude categories from get_the_category_list?No that’s not the problem. The syntax is fine I’m just missing a variable call somewhere so I’m going to search the forums and post elsewhere thanks
Forum: Fixing WordPress
In reply to: How to exclude categories from get_the_category_list?thanks for the replay but that’s throwing up a parsing error ??
Forum: Fixing WordPress
In reply to: How to exclude categories from get_the_category_list?I’ve added the links to the categories but can anyone help me with something I’ve left out?
<?php foreach((get_the_category()) as $category) { echo '<a href="'.$category_link = get_category_link( $category_id ).' "> '.$category->cat_name.'</a>' ; if($category->name=='text'||$category->name=='audio'||$category->name=='video') continue; } ?>
is returning the following:
<a href="https://www.pathtolink/?cat= "> 1940s</a>
I want it to show the category id like below in the link url, hat am i missing?
<a href="https://www.pathtolink/ROH/?cat=29 "> 1940s</a>
Forum: Fixing WordPress
In reply to: How to exclude categories from get_the_category_list?Following on from what you’ve done akamediasystem,
I’ve taken your 2nd line of code and added this within the loop of my single.php in my theme rather than hacking the core code and it seems to work
<div class="entry-meta"> <?php foreach((get_the_category()) as $category) { echo $category->cat_name ; if($category->name=='text'||$category->name=='audio') continue; ?> </div>
hope this helps
Forum: Fixing WordPress
In reply to: Overwriting thickbox js stylinganyone?
Forum: Plugins
In reply to: inactive commenters' alert or noticeYet again I have found a solution myself so if anyone’s interewsted i am using ‘Inactive User Deleter’ which will run a function to bring up all the inactive users and then you can delete but i’m just running the function so I can see who isn’t active
Forum: Plugins
In reply to: [CaPa Protect] [Plugin: CaPa Protect]I’ve sorted this myself by using the include command in a different way as I only wanted to exclude certain pages so I’ve done the following if anyone’s interested.
In the admin ‘Pages’ area, I’ve added all the pages I want included under a parent page and then simply set the command to include children of the parent page as below.
<?php wp_list_pages(‘title_li=&child_of=228’); ?>
thus excluding everything else.
As long as my client maintains this, then the navigation will work OK.