devoninternational
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Targeting just the single pages of the blog not custom post typesOK not sure if this is a workaround, but I excluded the single pages but then added in the CPT single pages. So basically a banner image shows for all the CPT single pages but not the blog post single pages.
if ( ! is_single() || get_post_type() == 'landing_pages' ) { // Show banner images for CPT single pages but not blog post single pages }
Duh, can’t believe I stumbled there, if anyone has cleaner code please let me know and thanks for the help blogjunkie
Forum: Fixing WordPress
In reply to: Targeting just the single pages of the blog not custom post typesThis seems to target even the posts of the CPT, just wondering how I can separate btw/ blog single post pages and CPT single post pages.
if ( get_post_type() == 'post' ) { // this code only runs for Posts }
Forum: Fixing WordPress
In reply to: Targeting just the single pages of the blog not custom post typesthanks, in more detail and in words I am trying to say if it is NOT a single page excluding the custom post types
so my weak attempt was:
if ( ! is_single() but somehow exclude CPT single pages )
I also tried the blog page ID in the post parent conditional but it did not work:
if ( ! $post->post_parent == '36' )
Forum: Plugins
In reply to: [Twitget] Tweet_time not showingSorry to further explain I have not altered the code to list the pages:
<ul class="pages"> {$tweets_start} <li>{$tweet_text}<br />{$tweet_time}</li> {$tweets_end} </ul>
Thanks again.
Forum: Fixing WordPress
In reply to: Add "blog/" to URL for single postsIs there another way to add “/blog” to just the blog posts and not all single pages or static pages?
Forum: Fixing WordPress
In reply to: Add "blog/" to URL for single postsYes, but that will add “/blog” to ALL single items, including cutom post types, which I do not want to do. I just want to add “/blog” to the blog posts, since those are the only blog items.
Forum: Fixing WordPress
In reply to: use limit words with IF statementFantastic I will soak this all in and reply, much appreciated.
Forum: Fixing WordPress
In reply to: Setting a Parent Page for a Custom Post TypeI do not believe that is what I am looking for. I am able to pull in the custom post types but I can not register the single pages as having a different parent.
Forum: Fixing WordPress
In reply to: Setting a Parent Page for a Custom Post TypeYes, I believe that is pretty accurate. I currently have a custom loop on my “News” page template that achieves that, but the child pages (single) do not register as children of “News”.
[Code moderated as per the Forum Rules. Please use the pastebin]
My main motive was to utilize this code to work with breadcrumbs and in the sidebars.
Basically, how can I get my custom post type single page (press releases) to register as child pages of “news”?
I figured by using a variation of the $post->post_parent code that I can trick the breadcrumbs into thinking the parent for the “press releases” is “news”.
Forum: Fixing WordPress
In reply to: Breadcrumbs for Single Pages and Custom Post TypesI have but it hasn’t been to productive without a link to my site. Unfortunately, the site is on a dev server.