Page 1 of 2 12 LastLast
Results 1 to 25 of 27
  1. #1
    Full Member
    Join Date
    January 18th, 2005
    Posts
    429
    Dynamic Shop Questions
    Hi!

    I just started using popshops -- it's GREAT!

    I do have a couple of questions regarding the dynamic shop:

    1) Is there a PHP code that I can use in the <title> </title> tag to change the title tag to the category that the page is using -- preferably without the "+" . For instance if the page extended is: index.php?psps_search=yellow+widgets, have the Title tag read: Yellow Widgets

    I tried a couple of PHP codes (I am not a PHP expert LOL), but all I could get was the default of the full URL in the Title.

    2) Is there a way to make the page extensions have "-" or "_" instead of
    "+" For instance if the page extended is: index.php?psps_search=yellow+widgets -- make it instead be: index.php?psps_search=yellow-widgets

    Thanks!
    Anne

  2. #2
    ABW Ambassador Caseyfern's Avatar
    Join Date
    May 18th, 2007
    Location
    Yes, sadly I'm in California
    Posts
    518
    I bet the post I just made to the topic on Managing Too Many PopShops will suffice for point 1 - the title code. Please let me know if it does not, or if you need further help.

  3. #3
    Full Member
    Join Date
    January 18th, 2005
    Posts
    429
    Hi Caseyfern!

    Thank you for trying to help with the PHP code.

    I couldn't get it to work on my strictly dynamic site. I am using Popshops' dynamic site code exactly ...

    If there is a way to change the code that is being shown by Popshops for dynamic sites, which is ...

    <? foreach ($categories as $category) { ?>
    <a href="index.php?psps_search=<?= urlencode($category) ?>">&raquo;&nbsp; <?= $category ?></a><br/>
    <? } # /END OF THE CATEGORIES ?>

    to something that will show the Categories/Category in the Title AND show the category on the side, I could use that.

    Thanks again!
    Anne

  4. #4
    ABW Ambassador Caseyfern's Avatar
    Join Date
    May 18th, 2007
    Location
    Yes, sadly I'm in California
    Posts
    518
    Ack.. I think I'm in over my head! The code I quoted is what my coder friend gave me to put in place, and I obey him mindlessly.

  5. #5
    Full Member
    Join Date
    January 18th, 2005
    Posts
    429
    Thank you Caseyfern -- I do appreciate your trying!

    I have sent support (at) popshops.com Two support emails and have not received an answer, acknowledgement -- etc.

    As we all know the Title is one of the most important aspects of SEO ...

    Thanks again.

  6. #6
    ABW Ambassador ladidah's Avatar
    Join Date
    October 15th, 2007
    Location
    MA
    Posts
    1,888
    Don't get your hopes up for someone trying to help you with this question.

    You will probably get a generic answer.

    I have asked the same question before.

    I hope I am proven wrong this time.

    Personally, I don't blame them since this is a programming question but it would be great for them to incorporate this as part of their dynamic pages...

    I have attempted creating what I think are dynamic titles but they don't seem to be indexed properly by the big G so I am still trying to tweak. The titles show up dynamically fine in view source but somehow when I looked at G indexed pages, they are not indexed. I have retweaked and retweaked. If it works after today, I will post. I don't know php so it's all trial and error.

  7. #7
    Full Member JessieJ's Avatar
    Join Date
    July 13th, 2006
    Location
    Seattle, WA
    Posts
    426
    I just don't know enough about custom scripting PHP to help with this question. If anyone has an answer, I would love to know it and would use it myself.

    We don't control the meta data, so can't do it through the snippet.

    Jessie
    Jessie Jones
    Create your custom affiliate store with PopShops.
    General support: support [at] popshops.com | Merchant requests: merchants [at] popshops.com
    (Include your popshops login, your shop name, and the URL or merchant you have an issue with.)

  8. #8
    ABW Ambassador Caseyfern's Avatar
    Join Date
    May 18th, 2007
    Location
    Yes, sadly I'm in California
    Posts
    518
    Did you try structuring your title tag like this? :
    <title><?= urlencode($category) ?> the rest of your title stuff </title>

    or

    <title><?= ($category) ?> the rest of your title stuff </title>

  9. #9
    ABW Ambassador ladidah's Avatar
    Join Date
    October 15th, 2007
    Location
    MA
    Posts
    1,888
    Quote Originally Posted by JessieJ
    I just don't know enough about custom scripting PHP to help with this question.
    ... perhaps those who designed the dynamic php scripting for popshops could further expand their script to include dynamic titles/descriptions/keywords as part of the dynamic feature that popshop has to offer for Enterprise accounts.

    No page is complete with those titles and metatags. You will be getting dupe content in your SERPs and who want that?

    Quote Originally Posted by JessieJ
    We don't control the meta data, so can't do it through the snippet.
    Yes, you can. If the php code is in the page for each shop, it can be dynamically included into the title/descriptions/metatags.

    Popshops have shown us great features and is an invaluable resource to many affiliates. We can customize everything, the css, the colors, rounded corners, etc. using Popshops,
    ...so all there is left is the title tags and meta tags....

  10. #10
    ABW Ambassador Caseyfern's Avatar
    Join Date
    May 18th, 2007
    Location
    Yes, sadly I'm in California
    Posts
    518
    Quote Originally Posted by ladidah
    ...
    ...so all there is left is the title tags and meta tags....
    ... but we can add those in all by ourselves pretty easily. The variable data are already there in that little foreach thingie - all I do is copy that into place in addition to the rest of my meta data, and voila.

    From what I've seen of the PopShops team, they're already pulling 20-hour-a-day workloads. What small time they do have left could be so much more productively applied to aspects that we can't do ourselves... or, perhaps, sleep.

  11. #11
    ABW Ambassador ladidah's Avatar
    Join Date
    October 15th, 2007
    Location
    MA
    Posts
    1,888
    Quote Originally Posted by Caseyfern
    ... but we can add those in all by ourselves pretty easily.
    Not all of us are programmers or have programmer friends to help us out. It does not come "easily" to everyone if this is a question I have seen asked here over and over again. The code for example you posted earlier does not work.

  12. #12
    Full Member
    Join Date
    January 18th, 2005
    Posts
    429
    Thanks again Caseyfern,

    Unfortunately, those two codes didn't work. I thought the same about the "foreach" info. I don't know know why it's not working ...

    I was asking the Popshops crew about this because they were providing the dynamic script.

    I'll try a PHP forum that has helped me before (if I can find them again LOL).

    Thanks again,
    Anne

  13. #13
    ABW Ambassador Caseyfern's Avatar
    Join Date
    May 18th, 2007
    Location
    Yes, sadly I'm in California
    Posts
    518
    Anne, if you want to drop me a private message and give me an IM (AIM, ICQ, MSN, GTalk), I will be glad to walk you through what we had to do in order to make this work - as I said, I'm using Smarty PHP, but there is a top-level index.php file that looks like standard PHP.

    If we do come up with a solution, one of us can publish it here in bright lights.

  14. #14
    Full Member JessieJ's Avatar
    Join Date
    July 13th, 2006
    Location
    Seattle, WA
    Posts
    426
    We are not ignoring feature requests by not furnishing the php snippet that will allow you to create dynamic titles. You have to step back for a sec and imagine that our code has to work on EVERYTHING. It has to work on WordPress, on custom sites, on all CMS's that support PHP. Then we have to create a version for the different flavors of ASP, etc.

    If it was as simple as us giving you a quick answer, we would, I promise you. Everyday we have feature requests and we do note them and do our best to address them.

    Make sense?

    Jessie
    Jessie Jones
    Create your custom affiliate store with PopShops.
    General support: support [at] popshops.com | Merchant requests: merchants [at] popshops.com
    (Include your popshops login, your shop name, and the URL or merchant you have an issue with.)

  15. #15
    Member
    Join Date
    January 2nd, 2008
    Posts
    72
    Caseyfern was close:

    <title><?= ($category) ?> the rest of your title stuff </title>

    should really be:

    <title><?= ucwords($_REQUEST['psps_search']) ?> the rest of your title stuff</title>

    You just end up pulling the search term out from the request variables. Oh, and the ucwords() function just capitalizes all of the words in the psps_search variable.

  16. #16
    Full Member JessieJ's Avatar
    Join Date
    July 13th, 2006
    Location
    Seattle, WA
    Posts
    426
    Another thing that just occurred to me is that would only work with accounts that have search capabilities (aka Enterprise).

    Thanks for debugging that, Dan.

    Jessie
    Jessie Jones
    Create your custom affiliate store with PopShops.
    General support: support [at] popshops.com | Merchant requests: merchants [at] popshops.com
    (Include your popshops login, your shop name, and the URL or merchant you have an issue with.)

  17. #17
    Full Member
    Join Date
    January 18th, 2005
    Posts
    429
    THANK YOU!!!!!

    It works!

    I knew it was a simple code -- just couldn't figure it out.

    I'm sorry Jessie if I seemed pushy ...

    I'm sitting in the middle of "FAY" right now and it has been howling all day and now into the nite and my nerves are a bit frazzled.

    I do appreciate the magnitude of what popshops has to offer.

    Thank you again!
    Anne

    PS -- Thank you too Caseyfern!

  18. #18
    ABW Ambassador ladidah's Avatar
    Join Date
    October 15th, 2007
    Location
    MA
    Posts
    1,888
    Quote Originally Posted by danharms

    <title><?= ucwords($_REQUEST['psps_search']) ?> the rest of your title stuff</title>
    Awesome thank you! That works!

    Just to show you how far off I was, this was my code:

    <title><?php foreach ($_REQUEST as $key => $title_tag) {
    if (strpos($key,"psps_") > -1 ) {
    echo ucwords($title_tag);}} ?> rest of the title stuff</title>
    Actually both code works, but mine is just patchwork .

    If it was as simple as us giving you a quick answer, we would, I promise you. Everyday we have feature requests and we do note them and do our best to address them.

    Make sense?
    Yes, thank you and sorry for being a pest.

  19. #19
    Full Member jazzylee77's Avatar
    Join Date
    February 19th, 2005
    Posts
    199
    How would you add a dash or pipe only when search is used. I'd like a little delimiter before "the rest of your title," but don't want to start the Title on pages that haven't run a search yet

    PHP Code:
    <title><?= ucwords($_REQUEST['psps_search']) ?> the rest of your title stuff</title>
    For example with the above code in the header with a search enabled shop, you would get only "the rest of your title"

    Searching for "widgets" you would get "widgets the rest of your title"

    I want to get "widgets: the rest of your title"

    But never : the rest of your title.

    Now that I've explained it 6 ways...

    I guess it would take some if else code, not sure how to read that condition from that function

    PHP Code:
    if (condition)
      
    code to be executed if condition is true;
    else
      
    code to be executed if condition is false

  20. #20
    ABW Ambassador 2busy's Avatar
    Join Date
    January 17th, 2005
    Location
    Tropical Mountaintop
    Posts
    5,636
    Whatever title code you add that only works on a search is not going to keep you from duplicate title tags problems. It will only be seen by a live person who is doing a search. The bots don't enter search terms so they can only see "the rest of your title stuff" and they will see it for every page of your shop. Adding "nofollow" to the pagination links will keep the bots out of the additional pages but also means that only one page gets indexed.
    I'm sure that a script such as you are contemplating could be used to add a relevant phrase to the title tags and description but it would need to be sent with the displayed data. That's how some datafeed client pages work, but those external scripts are also parsing the datafeed so they have the info to add. Since php is processed before the page loads it's hard to see how you could get an internal script to match up a title keyword for what will be displayed on the page via another script that is using external data.
    Now I've thoroughly confused myself.

  21. #21
    Member
    Join Date
    January 2nd, 2008
    Posts
    72
    Try this:

    Code:
    <title><?= (isset( $_REQUEST['psps_search'] ) ) ? ucwords( $_REQUEST['psps_search'] ).': the rest of your title' : 'the rest of your title' ?></title>

  22. #22
    Full Member jazzylee77's Avatar
    Join Date
    February 19th, 2005
    Posts
    199
    Quote Originally Posted by 2busy
    Whatever title code you add that only works on a search is not going to keep you from duplicate title tags problems. It will only be seen by a live person who is doing a search. The bots don't enter search terms so they can only see "the rest of your title stuff" and they will see it for every page of your shop. Adding "nofollow" to the pagination links will keep the bots out of the additional pages but also means that only one page gets indexed.
    I'm sure that a script such as you are contemplating could be used to add a relevant phrase to the title tags and description but it would need to be sent with the displayed data. That's how some datafeed client pages work, but those external scripts are also parsing the datafeed so they have the info to add. Since php is processed before the page loads it's hard to see how you could get an internal script to match up a title keyword for what will be displayed on the page via another script that is using external data.
    Now I've thoroughly confused myself.
    There will be links in navigation with search terms in the urls. That part works fine. I've seen pages in serps.

  23. #23
    Full Member jazzylee77's Avatar
    Join Date
    February 19th, 2005
    Posts
    199
    Quote Originally Posted by danharms
    Try this:

    Code:
    <title><?= (isset( $_REQUEST['psps_search'] ) ) ? ucwords( $_REQUEST['psps_search'] ).': the rest of your title' : 'the rest of your title' ?></title>
    Thanks. That gets me a lot closer. I was looking at isset, but didn't know the proper way to wrap it.

    Next problem is 'the rest of your title' is actually determined by php in a wordpress header with this

    <?php wp_title('&laquo;', true, 'right'); ?> <?php bloginfo('name'); ?>
    Trying to learn, but haven't got it yet...

  24. #24
    ABW Ambassador 2busy's Avatar
    Join Date
    January 17th, 2005
    Location
    Tropical Mountaintop
    Posts
    5,636
    My comments referred to a plain old non-wordpress domain. To add dynamic changes to headers in WP there is a set of parameters depending on the type of page being viewed that could be altered to fit your needs, it gets added to the header.php file:

    <?php if(is_single() || is_page() || is_category() || is_home()) { ?>
    <meta name="robots" content="all,noodp" />
    <?php } ?>
    <?php if(is_archive()) { ?>
    <meta name="robots" content="noarchive,noodp" />
    <?php } ?>
    <?php if(is_search() || is_404()) { ?>
    <meta name="robots" content="noindex,noarchive" />
    <?php } ?>

    That is the raw code used for altering the robots metatag, but it looks like the code Dan offered would fit right in. Haven't tried it, but I do use it for the robots metatag. Hope it's useful.

  25. #25
    Full Member jazzylee77's Avatar
    Join Date
    February 19th, 2005
    Posts
    199
    I already have the php that pulls from wordpress the page title category etc. , but I can't just chuck it in there like this and expect it to work.

    PHP Code:
    <title><?= (isset( $_REQUEST['psps_search'] ) ) ? ucwords$_REQUEST['psps_search'] ).'wp_title('&laquo;', true, 'right') bloginfo('name');' 'wp_title('&laquo;', true, 'right') bloginfo('name');' ?></title>

+ Reply to Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 1
    Last Post: August 5th, 2009, 03:42 PM
  2. Replies: 2
    Last Post: June 5th, 2009, 02:29 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •