Template tags are custom WordPress-specific functions for use in theme template files.

learn more… | top users | synonyms

0
votes
2answers
531 views

<!--more--> help

I have a custom post type called "Blog", in my templates I looping over the blog type and doing the following, <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> ...
0
votes
2answers
1k views

How to change a custom query into a standard loop?

I'm trying to modify how results are displayed in a post list that's currently controlled by the code below. However, it's not built in the WP_Query while ( $the_query->have_posts() ) : ...
0
votes
1answer
472 views

Second Level Menu

I'm trying to figure out how to do, Second Level Menu as a template function, that persistent when visiting any level, whether its a top level page, or a grand children Page. Any Ideas?
0
votes
2answers
284 views

How can I detemine the parameters needed by the_widget()?

I'm working with an old (now unmaintained) widget, which only allows one instance. Since I want to have a different sidebar on the homepage and I want this widget on both sidebars, I figure I need to ...
0
votes
2answers
2k views

How to use wordpress plugin functions on my “home” page?

The problem I am facing right now is, that I can't use functions provided by wordpress plugins on my "Home" page. To be precise: I use wordpress together with the wp-e-commerce plugin, which has no ...
0
votes
1answer
94 views

how to add # before tags?

Like Lifehacker and several other sites, would like to know how to add # before tags displayed on the site. for e.g. instead of a tag like "abc", how about "#abc". - is there a way to automatically ...
0
votes
1answer
33 views

Is there a template tag I can use to link to the archive page corresponding to the month that a post was published on?

For example, if the post was published on may 5th 2011, then clicking on "May 5th, 2011" would show all posts published in May 2011. How can that be done?
0
votes
1answer
176 views

Use template tags in code snippets wordpress

I'm trying to use WordPress template tags (through shortcodes) to merge the post title and url into hyperlink html code. Which looks like this: <a href="[Permalink]">[Post Title]</a>. ...
1
vote
2answers
913 views

Minor css-change based on topmenu - how?

I want to make minor css-changes based on the choice of the top (root) menu. What's the proper way to handle this in WP? //edit// It's a website (pages), no blog, and basically, the colors of some ...
0
votes
2answers
105 views

How to tell if all posts are only in one category?

I have a category.php page which redirects users to a certain template page if the article in the output is in a category. However, I am seeing that if I have say 10 articles,and only one is in the ...
2
votes
2answers
768 views

Making a Shortcode [NEXT] and [PREVIOUS] to place into specific posts for post navigation

I really need some help, I dont know where else to turn with this request. I'd like to add a shortcode to one of my posts. The template tags get_next_post() and get_previous will not work for me since ...
0
votes
1answer
4k views

Get permalink and title by post name?

In the theme there is a custom post type called faq I just want to get certain post by its name (NOT by id cause no id exist). <?php query_posts('post_type=faq') ?> how to get the_tile() and ...
1
vote
1answer
573 views

Exclude a category from the_category in the single post page

I want to include something like the the_category function in a WordPress post, which by default echoes a list of links to all categories the post is attached separated by comma, but I want to exclude ...
0
votes
2answers
408 views

Is it possible to add a child post into the parent page?

Is it possible to add a child post into the parent page? Basically I have a 1 parent page and it has 2 child page that has a simple content , and I want the child page content to put also in the ...
1
vote
5answers
3k views

On the category page, get the category object

Right, hopefully a nice and simple one... I'm on a category page with the id of 4, I want to get the category object back so I can interogate a few values. I've had a good old look in the WP codex ...
0
votes
1answer
978 views

How to query details of images in gallery that is attached to a post

I have several images attached to each post. I need to generate a gallery, but because it's heavily customized I don't want to use a gallery plugin, nor the gallery short code. It's also situated in a ...
0
votes
2answers
321 views

Return function only on certain pages

I'd like this function to only return on certain pages. How might i do that? // Retreats Accordion function retreats_accordion() { ?> <!-- accordion root --> <div id="accordion"> ...
3
votes
2answers
2k views

Remove line breaks in wp_list_categories()?

I am trying to output a list of categories per an article. I am using the following code, <?php wp_list_categories('child_of=270&style=none'); ?> (string) Style to display the categories ...