problems with archive pages
This topic contains 19 replies, has 3 voices, and was last updated by Paolo 9 years, 3 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support TicketTagged: archive, categories, navigation
-
AuthorPosts
-
August 7, 2015 at 11:13 pm #48604
Issue #1:
I am having some issues with the Archive pages that are created by the plugin.
* I am unable to hide the Popular Categories block
* The page title shows up as Archive, not as whatever the category might beHere are examples from the website:
main page: http://sunprairiemoves.org/location/
– looks correct
details/listing page: http://sunprairiemoves.org/localrack/united-states/wisconsin/sun-prairie-1/muni/city-of-sun-prairie-west-side-building/
– looks correct
category page: http://sunprairiemoves.org/localrack/health/
– title is Archives
– Popular Categories block is visibleI did try messing with the widgets but am not able to locate a widget for the top section of the category pages. Only Home, Listing, Search, Detail and Author.
I realize I can make them disappear using CSS but was hoping this was something in the plugin that I could select rather then messing with the codes, in case I want to change something back later without having to read over what edits I made.
Issue #2
the link to take the user back to the main GeoDirectory screen is not working. Using that same link (http://sunprairiemoves.org/localrack/health/) if you click on “places” in the navigation right above the listings it take you to http://sunprairiemoves.org/localrack/ which is an Archive page for all the listings. Shouldn’t it take the user back to http://sunprairiemoves.org/location/, the main page?August 8, 2015 at 2:29 am #48620Issue 1
http://sunprairiemoves.org/location/ is using the /location page template (GD Home).
http://sunprairiemoves.org/localrack/health/ is using the GD Listings (categories) template (GD Listing), so if you want to remove the list of categories there remove the GD Popular Categories widget from a GD Listings section at Appearance > Widgets.
The reason your category pages are showing “Archives” is because I guess you are using a DEO plugin and have not changed the title in the plugin settings.Issue 2
Similar to your issue 1. You are mixing up location pages and category pages (GD home versus GD Listing).August 8, 2015 at 2:40 am #48625Issue 1
Thanks. Looks like I missed that when looking at the widgets.As to the Archives title, I am not sure what you mean by DEO plugin. Maybe you are referring to SEO and I don’t have any on my site at the moment. I am using Insert Headers and Footer to place Google analytics in my footer but no SEO.
Issue 2
Is it possible to change the main listings page link in the navigation to the home page? I wasn’t able to find links anywhere in the settings for the listing pages to take the user back to the home page.August 8, 2015 at 2:45 am #48627Issue 1
Yes, I meant SEO 🙂
Try de-activating Headers and Footer and see what happens.
You can always add your analytics code at GD > design > scripts > footer section.Issue 2
Just add a custom link using the WP menu.
And review https://wpgeodirectory.com/docs/core-design/#navigation to remove or add other relevant links.August 8, 2015 at 2:59 am #48628I added the code in the GD scripts footer section and deactivated the Headers and Footers plugin. No change, the listings pages still show Archives.
On Issue 2, I think I can added the template to my child theme and change out the php to swap the listing home page for the location home page. I saw a hint that pointed to this page which gave me the idea. https://wpgeodirectory.com/docs/customizing-geodirectory-templates/
August 8, 2015 at 3:01 am #48629This reply has been marked as private.August 8, 2015 at 3:07 am #48632Turn them off one by one and you will know 🙂
But then it is more likely to be your theme I think.
Post admin details in a private reply and we’ll see what we can figure out.August 8, 2015 at 3:09 am #48633I’ll work on the plugins and if that doesn’t work, I will send some other details.
Thanks.Oh, as an aside, I am using Spacious as the theme and running a child adaption.
August 8, 2015 at 3:19 am #48634This reply has been marked as private.August 8, 2015 at 4:29 am #48638I guess the code in your header to create the H1 tag overrides how GD creates the page title.
Sorry, but we cannot debug other people’s coding.August 8, 2015 at 4:35 am #48639I understand. Thanks for taking a look.
August 8, 2015 at 4:46 am #48640I just checked and I only added the category description to the H1 code in the Header.php file.
Here’s the original H1 code from the Spacious theme:<div class="post-title-wrapper"> <?php if( '' != spacious_header_title() ) { ?> <h1 class="header-post-title-class"><?php echo spacious_header_title(); ?></h1> <?php } ?> </div>
And here is the same area in my child theme:
<div class="post-title-wrapper"> <?php if( '' != spacious_header_title() ) { ?> <h1 class="header-post-title-class"><?php echo spacious_header_title(); ?></h1> <?php echo category_description( $category_id ); ?> <?php } ?> </div>
I wouldn’t think adding a line for the description would change the code enough to cause a glitch in the H1 titling of the plugin. Thus, I am assuming it is either something else or the theme is breaking the plugin.
August 8, 2015 at 5:06 am #48643Other plugins like GD tap into your header as required. I guess you are preventing that interception, so it uses the WP default and thinks this is an archive page that shows all your posts. And that is correct, a GD category page is a WP archive page showing GD posts, aka listings.
I alerted Paolo to your post too, he probably can add a bit after the weekend.August 8, 2015 at 5:06 am #48644I was just looking at the demo site for GeoDirectory and noticed the H1 doesn’t even exist on the listing pages. However, it does exist on the one post page Hello World. That looks like you guys did something special with your theme and that I won’t be able to do anything because of the theme I am using.
So, I am digging into your theme same code and mine to see if I can make something change in my child theme header.
August 8, 2015 at 5:22 am #48645I do see that the body does include a class of ‘post-type-archive-gd_place’ and the single listing includes ‘single-gd_place’. So I added some CSS in the child theme to make the title container disappear on those pages:
/* hides Archive title section on GeoDirectory listing pages */ .post-type-archive-gd_place .header-post-title-container { display: none; } .single-gd_place .header-post-title-container { display: none; }
Figured I would load this here in case anyone else has the same issue with their theme.
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket