Wordpress feed and post titles duplicating - wordpress

I just checked the feed title and some of the post titles also and is very much confused. The title is duplicating itself like: Site Title | Site Title. Here is the link of the feed:
http://www.dharamshalatravels.com/feed
Please let me know any solutions for this. I have checked the core files and there is no problems in those files.
Thanks in Advance

I usually replace the core feeds:
http://codex.wordpress.org/Customizing_Feeds
I'll usually make a custom template and assign it to a page.
In the custom template I'll build my own RSS.
The title is made by: <title><?php bloginfo_rss('name'); wp_title_rss(); ?></title>
both these functions can be filtered.
with add_filter('wp_title_rss','');
and add_filter('bloginfo_rss','');
Some template or plugin is probably screwing this up.
add you own filters to find out which of the two (if not both?) is messing it up and apply your own filter.

Related

woocommerce theme development without shortcodes

I was wondering if someone could help me out. I am developing a theme that uses woocommerce as the ecommerce solution. I know that there are predefined shortcodes that you can use but i was wondering if there was a way to actually implement woocommerce items in my php code as opposed to using shortcodes.
Thanks,
Try this:
https://wordpress.stackexchange.com/a/125286/60175
<?php echo do_shortcode('[product_page id="31"]'); ?>
And at the Shortcodes doc, I see
To find the Product ID, go to the Product > Edit screen and look in the URL for the postid= as shown below.
http://docs.woothemes.com/document/woocommerce-shortcodes/
Of course this still uses shortcodes (pretty slick), but in your PHP. The Wordpress framework must be available in your PHP page, which I think you do by including wp-load.php at the beginning.

How to add a meta keyword tag in each page of my drupal application?

I want to add a meta keyword tag which have to come with every pages within my drupal website. How to do that ?
It's too easy just use the meta tag module .
And for drupal6 i found this: Meta tags Node Type
Welcome
It might need a bit of tweaking but I built a module that does this.
https://github.com/SpaceBeers/Drupal-7-Meta-Tags-Module
It also lets you set a site wide default title and description which can be overridden for each node. You can select which content types this appears on.
It'd be nice to get some feed back on it.
Just add The code given below at the top of your template.php file (Custom).
drupal_set_html_head('<meta name="keywords" content="CustomKeyword" />');
Done.

Adding A Button Between post-content and Related Posts Thumbnail Plugin on WordPress

I am trying to add a button to my WordPress template. Basically, I have the post and then there is the Related Posts Thumbnails widget that appears. I want the button to go between the text of the post and the related posts thumbnail widget. The code in my 'Single Post' that contains all of this is as follows:
<div class="post-content">
<?php the_content(__('<em><strong>More:</strong> Read the rest of this entry...</em>', 'life-is-simple')); ?>
</div>
I know the Related Posts Thumbnails plugin falls within this code because it's at that place when I 'Inspect Element' on Google Chrome. I can't find how to edit the order of things within that div though. Any help would be greatly appreciated, thanks!
EDIT
Clarification: I am using the Life Is Simple WordPress theme although it has been custom editing quite a bit (mostly on the CSS side of things though).
That plugin is probably appending the output to the_content with a filter .
That means , that the output is being added to the_content automatically. it is a common behaviour.
You need to look at the pluginĀ“s admin interface to see if you can have an alternative way (I believe there is ) which is using a template tag. in that case, you should put the template tag after the div where the the_content() is .
EDIT I :
After a small dig, - in fact there is - you need to put
<?php get_related_posts_thumbnails(); ?>
Then the plugin should know by itself not to append to the_content.
For parameter passing, or if something is not working, go read their APi or help files.
You'll probably need to edit single.php or archive.php in your theme. If nothing is occuring there that looks familiar, it's probably using a loop. In which case you might find what you are looking for either in loop.php, loop-single.php, or loop-archive.php depending on what type of page you are on and how the theme was constructed. Add your button near where you find Read the rest of this entry...
With more information (such as what theme you are using), one might be able to help more as well.

wordpress custom archive page type

i'm starting with wordpress (from a drupal background) and trying to figure out how to create a new "menu" or url pattern. not quite sure what the lingo is in wordpress so im having a little trouble searching online for it.
the current archive allows you to sort by: /post/date/2010/06
what i'm trying to do is extend the archive functionality to include a "day" as well.
ie. /post/date/2010/06/22
i dont mind creating a new page type for this purpose such as /archive/YYYY/MM/DD or something like that.
not sure where to begin with matching the "url pattern" to the "url handler" function or template.
I ended up using:
<ul><?php wp_get_archives('type=daily'); ?></ul>
It gave me an archival list of links which point directly to the pages I needed.
The archive already supported filtering by day, so I just needed to find a way to access it.
The url pattern is /post/yyyy/mm/dd
If anyone is interested in generating a link directly to that page, use:
<?php echo get_day_link(2010, 6, 20); ?>
Wordpress can customize the style of permalinks you use on the Settings/Permalinks tab of your administrative page. It sounds like you want something like /%year%/%monthnum%/%day%/%postname%, which should allow you to group by year, year/month, and year/month/date.

How to make custom post template in Thesis theme

I'm struggling to use custom post template in thesis. I would like to use different layouts for different posts. There are many tutorials for using custom page template but I can't find ones for posts. I'm new to Thesis so I probably miss something but if someone knows how to or tutorial that mentions about it, please share with me. Thanks in advance!
One way to do this (that goes against the thesis custom_functions.php file, unfortunately) is to use this plugin:
http://wordpress.org/extend/plugins/custom-post-template/
Then, create a page called, say, news.php and put this code inside
<?php
/*
Template Name Posts: News
*/
/*
Your custom code goes here
*/
Then, once you upload this to your thesis folder, it should show up in the post-template dropdown.
?>
Answer #1 in this post might provide you with a way to style posts in Thesis or elsewhere, as long as you're using WP 2.8+:
http://www.smashingmagazine.com/2009/10/20/10-useful-wordpress-hacks-for-advanced-themes/

Resources