how can i get the page_ID in nav li [closed]
Can you not see it? This: esc_attr( $item>attr_title ) …should be: esc_attr( $item->attr_title ) // See the hyphen?
Can you not see it? This: esc_attr( $item>attr_title ) …should be: esc_attr( $item->attr_title ) // See the hyphen?
It is really hard to say without being able to look at your theme files directly. But you are most likely going to have to put <div id=”hbz_outer_container” style=”position: relative;”> <div id=”hbz_drop_shadow”> somewhere in your header.php and then put the closing tags: </div><!– hbz_drop_shadow –> </div><!– hbz_outer_container –> in your footer.php header.php and footer.php should … Read more
Google code for displaying custom post items. Fetch all the custom post items in an array and then use a simple html of a drop down and put it in a for loop which will go through all the elements of custom post type. In the value attribute of drop down use the current array … Read more
No, the blog page is just a regular page, it has no special ID number and it can be anything. The only special thing about a blog page is that it was assigned to use as a “blog” page and you can check for its ID value in one of the options.
I believe you are talking about the blog page, the page you set as posts page when you select a static front page. Many functionality like breadcrumbs relies on the $post global. By default, if nothing breaks the $post global, before the loop, the $post global should always hold the first post in the main … Read more
You can use the has_tag function in a conditional statement to achieve what you want. Take a look at the codex page here: Function Reference/has tag. This isn’t 100% tailored to your specific question, but you should see how it’s working and adjust for your specific task: <?php if( has_tag() ) { ?> <?php query_posts( … Read more
there are two WordPress functions you could try: http://codex.wordpress.org/Function_Reference/get_page_by_title (as suggested by @t31os in the comments to your quoted link) http://codex.wordpress.org/Function_Reference/get_page_by_path if you have already tried them, please describe how these failed to do what you want.
I think I got it. You’re querying for sticky posts. Attachments can’t be sticky at least by default. Hence, you’re see the normal loop order when sticky posts are involved. So if you add this to your second args array: ‘ignore_sticky_posts’ => true I think your problem should be resolved. Here’s the relevant codex section … Read more
I would suggest a different approach. The option for manually adding post excerpt should go in a theme option as opposed to a custom field. Also you should use this hook for modifying the excerpt’s more text http://codex.wordpress.org/Plugin_API/Filter_Reference/excerpt_more If the user is supposed to enter custom excerpt on a per-post basis, they can do it … Read more
what about get_terms(‘link_category’);? Once you have the objects, you can use them to get whatever information you like.