Support » Plugin: RecipeSEO » [Plugin: RecipeSEO] Multiple IDs

  • This is great tool for my admins to add proper semantic markup around their recipes. Thank you very much.

    I noticed you are adding ID tags to certain elements in each recipe but that these IDs are not different for each instance. This causes conflicts when multiple recipes are displayed on a page (2 per post or a page with multiple recipe posts). Incrementing the IDs would help on a single post but would not solve for the multiple posts per page issue. Would you consider removing the IDs and leaving the classes (or adding additional classes to compensate)?

Viewing 1 replies (of 1 total)
  • ok i actually went ahead and edited recipeseo.php to avoid id conflicts.

    On the containing hrecipe DIV, I added an ID of recipeseo-[#] where [#] is the recipe_id. then I removed all of the IDs from the child elements where a conflict could have existed. I didnt remove them completely – I moved them over as a class. So, anyone who already has CSS written for this can simply change the # declaration to . and the style should hold. The ingredient list items and instruction list items each had IDs like recipeseo-ingredient-2-amount. I added the recipe ID to this format (recipeseo-3-ingredient-2-amount). I think this should do it. If anyone still needs to access a specific title or rating, they can first reference the hrecipe-[#] and then find the element by class (#hrecipe-4 .recipeseo-title).

    I’m not the author of this plugin and I did not have explicit permission to make the changes (but it’s Ok because of the GNU General Public License). So, if anyone would like my version, let me know and I’ll send it to you. CodeSwan – if you see any merit in what I did and would like to throw it in a version, I can show you the simple changes I made or send you the new file.

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: RecipeSEO] Multiple IDs’ is closed to new replies.