bknutson
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Placement of bannersTry !is_single( ’28’)
Forum: Fixing WordPress
In reply to: Placement of bannersIt sounds like you want it to show up on all pages except a few, am I correct?
You could try something like this:
<?php if ( !is_page( '8' ) || !is_page( '10' ) || !is_page( '12' ) ) { ?> // code to insert banner <?php } ?>
Should put the header on all pages that are not page_id 8, 10 or 12.
Forum: Fixing WordPress
In reply to: Placement of bannersDo you only want the banner to show on the front page, or every page other than the front page, or some combination of pages and the front page?
Forum: Fixing WordPress
In reply to: CSS for menu linksAh, the theme is generating this for you.
I believe you can edit the menu items (and their URLs) on the Appearance -> Menu page.
https://codex.www.ads-software.com/Appearance_Menus_SubPanel
Hope this helps.
Forum: Fixing WordPress
In reply to: CSS for menu linksYou wouldn’t change the destination link in the CSS. CSS stands for Cascading Style Sheets – it’s for styling your page.
You would need to find which of the theme files your nav menu is in. It’s probably in the header.php file.
Change the href=”” element of the appropriate a tag to whatever external site you want to link to. I would also suggest adding target=”_blank”, which will open the page in a new browser tab/window (personal preference) so your final tag would look something like this:
<a href="link.to.external.site" target="_blank">Menu Item</a>
Forum: Fixing WordPress
In reply to: Placement of bannersIf you edit a post in the admin, look at the URL. For example:
…/wp-admin/post.php?post=8&action=edit
The above URL shows “post=8”, so your if statement would be
<?php if (is_page( '8' )) { ?> // code to insert banner <?php } ?>
Forum: Fixing WordPress
In reply to: Placement of bannersIt depends on what page(s) you want the banner to display on. You can edit the header.php with an if statement. This if statement will insert the banner on the front page only:
<?php if (is_front_page()) { ?> // code to insert banner <?php } ?>
You could also use if (is_single( ” )) or if (is_page( ” )) or others to insert on only certain posts/pages (obviously inserting the proper post number or page number between the quotes).
Forum: Hacks
In reply to: Count posts without assigned taxonomyThanks bcworkz, I’m going to create a new thread regarding requiring a taxonomy to be assigned before publishing is allowed.
I’m still hoping to find a solution here so if anyone else has any advice I’m all ears!
Forum: Hacks
In reply to: Count posts without assigned taxonomyI’m still hoping someone can help me out with either a WP_Query or SQL query that will accomplish this. My ultimate goal is to build a page that will run this query and spit out the resulting post titles (with links to them) as sort of an after-the-fact error checking process. Does that make sense?
bcworkz – thanks for your help so far. I’m comfortable writing the code to require a “sub” value, but am wondering if this would need to be in the post-new.php file, or perhaps post.php? Am I completely wrong?
Thanks!
Forum: Hacks
In reply to: Count posts without assigned taxonomyThanks for your reply. A filter might be a better option, how would I go about setting this up?
I tried
WP_Query( array( 'post_type' => array('type1','type2','type3',...), 'sub' => '', ...));
and
WP_Query( array( 'post_type' => array('type1','type2','type3',...), 'sub' => NULL, ...));
however both resulted in pulling every post with the specified custom post-types in the database.
I was hoping to use WP_Query as I’m not sure how to go about writing a SQL query that will pull exactly what I’m looking for.