tjsherrill
Forum Replies Created
-
Forum: Hacks
In reply to: how to use shortcodes inside a custom fieldThat looks great. Do I need to define CITY in the functions.php file at all? or does the custom field know that CITY = $city ?
this has been a huge help and its getting me over one of the larger bumps in this project.
thanks
Forum: Hacks
In reply to: how to use shortcodes inside a custom fieldI am using WP3.0 to create a multi site network of city based sites. Part of the project is making sure that some basic SEO tasks work out of the box. When I create a network site I get to set the site desc to anything I want. So I figured I would tap into that to create a keyword, i.e. Seattle, Portland… The point is not to spam the web at all. The client runs franchise locations in these towns. so the content is 90% the same but its geo tagged.
I am using a plugin that helps keep my content inline from site to site, and it can include custom fields. So I wanted to setup my custom fields to handle meta desc and meta keywords. So I have custom fields for Description, and Keywords. Then to keep the site as simple to manage as possible, when I create a new sub site I simply propogate the blog description field with a city name. Then I use the shortcode to input that city name across the site anywhere I want. In this case in the custom fields meta tags, I want to be able to reuse the shortcode multiple times.
Example for Seattle site:
Meta Description: Seattle based cleanup services
Meta Keywords: Seattle industrial cleanup services, Seattle Commercial cleanup services, Seattle Hazardous waste cleanupBut because I am editing the meta tags on the parent site of all these networked sites I have to input the tags like:
Meta Description: [bloginfo key=’description’] based cleanup services
Meta Keywords: [bloginfo key=’description’] industrial cleanup services, [bloginfo key=’description’] Commercial cleanup services, [bloginfo key=’description’] Hazardous waste cleanupin my functions.php
function bloginfo_shortcode( $atts ) { extract(shortcode_atts(array( 'key' => '', ), $atts)); return get_bloginfo($key); } add_shortcode('bloginfo', 'bloginfo_shortcode');
It seems like the problem with the do_shortcode() is that it grabs the shortcode a single time while I need to grab it once in one spot and then 6 times in another spot…
sorry for the book here, thanks for the help
Forum: Hacks
In reply to: how to use shortcodes inside a custom fieldThanks for the help but I am still not 100% on it.
From my understanding after reading the docs is that:
<?php echo do_shortcode(‘[bloginfo key=’description’]’); ?>would print out the shortcode contents. The issue I think I am running into is that I want to plug this shortcode in, in several spots for keyworks. I am using the blog description is a method of geotagging a page, so for example the blog desc in this case is Seattle. So I want to use Seattle several times in the keywords section. So my custom field will look like:
[bloginfo key=’description’] Kites, Where to fly kites in [bloginfo key=’description’], Something else about [bloginfo key=’description’]
Does that make sense? Is this the best way to get this done?
thanks
Forum: Networking WordPress
In reply to: sub sites not listed in my sitesI am sorry. I am the idiot here. I was using a different email. Thanks so much for your help.
Forum: Networking WordPress
In reply to: sub sites not listed in my sitesthanks for following up, that is what I have been doing. Any other fixes, it still creates a different admin user.
Forum: Networking WordPress
In reply to: sub sites not listed in my sitesdo you think that is the issue with the Multi Post as well? If so then how do I change it so that I am the admin on the sub-site? It is creating a user automatically when I create a new site…
thanks for the help…
Forum: Networking WordPress
In reply to: How to create multi site page inheritance?Live pheonix did you ever get this working, I am just trying to wrap up this project and have a few outstanding items like this inheritance issue.
Forum: Plugins
In reply to: Recomended plugins for a training site?thanks Chris – Helps alot
Just to give a bump to this post. JimmyJames solution worked for me. I replaced the lines and things are working better. Cropping is delivering better results.
thanks
Forum: Plugins
In reply to: Recomended plugins for a training site?I have looked at Wishlist, and I have used Suma. I think you have the general idea. there will be public users browsing the site, and information on available training programs. Once someone decides that they want to buy a specific training, they can purchase it (so e commerce), then they will have access to that training program inside their account. They won’t have access to any other training just the one they paid for…
Does that make better sense?
thanks for helping.
Forum: Plugins
In reply to: Recomended plugins for a training site?Anyone?
Forum: Fixing WordPress
In reply to: Adding a .current class to a query_posts arrayMark that was exactly what I needed. Thank you for your help.
Forum: Fixing WordPress
In reply to: Adding a .current class to a query_posts arrayThanks so much for all this help. I will work to implement and see how it goes. Then I’ll report back… thanks
Forum: Fixing WordPress
In reply to: Adding a .current class to a query_posts arrayMaybe, I am newer to php and WP. I can typically figure these things out slowly but surely but this one has been giving me fits. I assume by echo you mean that somewhere in there I should say echo “if its the current page put class=”current_page”.
At the end of the day I only want the .current_page on the current_page, and I dont think I can use wp_list_pages for this as I am grabbing different pieces of content from the page.
any more help is greatly appreciated.
Forum: Fixing WordPress
In reply to: Displaying sub page featured images on homepageAnd it figures that right after I ask this I would also find the solution.
<?php wp_reset_query();?>
Placed right after the initial query fixes the problem entirely.
thnaks