Support » Plugins and Hacks » [Plugin: All in One SEO Pack] New Macro for %parent_category% ??
6 years, 2 months ago
So I’m trying to figure out a much asked question. How can I hack the plugin to include a macro for parent categories in title tags?
For example, I have the following structure in one category:
I would like my category title tags to display
<title>Sub 2 | Subcategory | Blogname</title>
Example for a site shutterdown magazine would be:
I would like it to display
<title>Limelight | Nashville Pics | Shutter Down Magazine </title>
Single parent, single child
For ease of use I would like to plug it in as a macro %parent_category%
Any ideas? Work-arounds?
I added the following to line 708 in aioseo.class.php but get only “array” in the place where the category parent should be…
$title = str_replace('%category_parent%', get_the_category($category->category_parent), $title);