id eric
Forum Replies Created
-
Alright, so apparently this need is not support with wordpress core functions. However, I found a great post on a related thread that provides the answer. ref
Add this to your functions.php file:
function is_city( $city ) { $cities = wp_get_object_terms( get_the_ID(), 'deals', array( 'fields' => 'names' ) ); if( in_array( $city, $cities ) ) return true; return false; }
Add this to your widget’s “Widget logic” field:
is_city(‘Orlando’)I have tested this, and it is working for me.
Great, thanks for the follow-up shauno. ??
I just noticed that %%pagetotal%% and %%pagenumber%% do not work on the custom category title editor within the Category Editor.
I think figured it out. I navigated to the plugin’s folder via FTP client and found the readme file. Along with other details, it mentions this:
= Ok, and how do I make the voting form appear for images? =
For images there’s an extra step. First you still need to enable voing on the specific images you want. Then you need to add a tag to the gallery file of NextGEN. I’m going to use NextGEN version 1.3.6 to as the example, but it should be pretty much the same for all ‘newish’ versions:
Between line 38 and line 50 in/nextgen-gallery/view/gallery.php
is the loop that shows each image in a specific gallery. You need to add the following tag anywhere in that loop:<?php echo nggv_imageVoteForm($image->pid); ?>
.
That will output the vote form where you put it. Personally I like to place it on a new line after the close<a>
tag (new line created 45)That seemed to fix it for me.
Having the same problem. Did you get it figured out lenrapp?
Forum: Fixing WordPress
In reply to: Cannot update Posts/Pages@doc4: I have tried deactivating all the plug-ins and running through the list of tests and the problem persists. Would plugins still cause conflict if they are installed, but deactivated?
Forum: Fixing WordPress
In reply to: Blank Permalink Admin Page after changing permalink typeHad this same problem, took us forever to get our issue resolved. We did this:
Rebuilt apache (using easyapache within cPanel) with version 5.2.x instead of 5.3.xForum: Fixing WordPress
In reply to: permalinks and latest release 404 issuesHad this same problem, took us forever to get our issue resolved. We did this:
Rebuilt apache (using easyapache within cPanel) with version 5.2.x instead of 5.3.xForum: Fixing WordPress
In reply to: How Come FTP Never Works?We run a dedicated server with gigenet, and we resolved this issue by recompiling our server’s Apache/PHP installation with suPHP
Forum: Fixing WordPress
In reply to: Page is ancestor of?Here is my end result for those that come across this thread:
// [not shown] special cases for post categories up here (using is_ancestor_of function) // now for the pages elseif(is_page()) { //get post id global $post; $page = $post->ID; // Some Menu for a set of pages if($page == "68" || $post->post_parent == "68" ) { ?> <h3>Some Title For this Set of Pages</h3> <ul> <?php wp_list_pages('orderby=name&child_of=68&title_li='); ?> </ul> <?php } // Another Menu for another set of pages if ($page == '751' || $post->post_parent == "751" ) { ?> <h3>Some Other Title For this Set of Pages</h3> <ul> <?php wp_list_pages('depth=2&child_of=751&title_li='); ?> </ul> <?php } } else { ?> // standard sidebar stuff for untargeted pages or posts
Forum: Fixing WordPress
In reply to: Page is ancestor of?Yes, thank you. ??
Forum: Fixing WordPress
In reply to: Page is ancestor of?I am looking to display a sub-navigation in the sidebar of all the child pages for a parent page. Is this the best way to achieve this?
Forum: Fixing WordPress
In reply to: cat_is_ancestor_of::bows::
Thanks!Forum: Fixing WordPress
In reply to: cat_is_ancestor_ofI guess my problem is determining the category id of the category that the user is currently viewing.
How would I adjust the cat_is_ancestor_of parameters to include the ID of the category the user is current viewing?
thanks in advance.
Forum: Fixing WordPress
In reply to: cat_is_ancestor_ofI adjusted my code to the following:
$cat = get_query_var(‘cat’);
$args = array(
‘include’ => $cat,
‘hide_empty’ => 0
);
$categories = get_categories($args);
if( ($cat == 11) || ($categories[0]->category_parent == 11) || ($categories[0]->category_parent == 28) || ($categories[0]->category_parent == 27) || ($categories[0]->category_parent == 26) ){The downfall to this, is that it only deals with direct childs. So if you have 2 levels of categories, then you will have to manually add category_parent parameters. Is there a way to check if a category is a sub-category of a category that is higher up the chain? Maybe using the cat_is_ancestor_of function? I couldn’t get it to work…