toma
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Press This not working properlySolution: It seems that the legacy bookmark within the browser is the source of the problem. I opened the Firefox bookmarks menu, edited the existing ‘Press This!’ bookmark by pasting the javascript from the Dashboard>Tools accordian dropdown (select the clipboard icon) into the bookmark location field. All features restored. It is a great feature.
Forum: Plugins
In reply to: [Smarter Navigation] get_referrer_category IDThe nav-list is static markup.
This is primary header.php navigation.
I added the following to my single-page:<?php $referrer_cat = get_referrer_category(); // returns category object $referrer_cat_id = ( is_object( $referrer_cat ) ) ? $referrer_cat->term_id : false; // we take category id ?>And edited my static link with:
<li<?php if ( is_category( '19' ) || $referrer_cat_id === 19 ){ echo " class=\"current\""; } ?>><a href="/wordpress/sandbox01/?cat=19">Print</a></li>
This shows the current-class correctly for the category-page, but fails for the single.php page where the referrer_cat ID is needed to create an active state.
PU is a typo, I meant PI for ‘plug-in’, sorry.Forum: Plugins
In reply to: [Smarter Navigation] get_referrer_category IDThanks. I am trying to grab the referer cat for the single-page to produce an active state within the header nav-list. The conditional function below works great and produces an ‘active’ state for my cat-pages of posts, but when the single-page loads for a post it drops the active state from the nav-list while the PU correctly paginates the category within the single-page.
<li<?php if ( is_category('11') ){ echo " class=\"current\""; } ?>><a href="/wordpress/sandbox01/?cat=11">Environmental</a></li>I tried adding your suggestion to the header.php but cannot get the desired feature. It also breaks my active state for the category page. In my original snippet (original post), it works for both cat-pages and single-pages only ALL of the referrer-links become ‘active’ on the single-page. You have an earlier thread related to this problem but it seems no longer relevant to the current version of the PU.