- This topic has 21 replies, 2 voices, and was last updated 6 years, 8 months ago by
David.
-
AuthorPosts
-
July 30, 2019 at 5:40 pm #971666
James
Hi David,
COuld you clarify this part for me please?
Now you will need to edit each category specific page / header element
Pages, or header elements, or both?
July 30, 2019 at 5:56 pm #971674David
StaffCustomer SupportBoth – the duplicates will contain the original shortcodes from the home page and header element. So all duplicated shortcodes will need to be updated.
July 31, 2019 at 4:43 am #971967James
This worked, albeit it was even simpler than you had written! I had to duplicate post lists and the magazine grid element (as many times as I needed). Didn’t need to duplicate pages in the end (although I did initially).
I also learned (as you said) more about how Dispatch works. Thanks a lot!
On another note, I solved the hooks problem by removing the line from the wp-config.php file, but I worry that this now leaves me open to attacks? Is there any way around this?
Also, when using the “Simple” post list, is there any way to move the titles of articles closer to the image on the Desktop version and not the mobile/tablet versions?
July 31, 2019 at 8:22 am #972258David
StaffCustomer SupportAwesome 🙂 Great to see people expanding on Dispatch.
The
define( 'DISALLOW_FILE_EDIT', false );does impose a security risk, it allows anyone who has administrator access to change files from the admin panel and potentially inject malicious code. But the reality if someone has managed to hack your site and gain admin access then they will most likely be capable of getting around this anyway.You can adjust the padding around the simple card content for desktop with this CSS:
@media (min-width: 769px) { .wpsp-card .wpsp-content-wrap { padding: 5% 8% !important; } }5% (top and bottom) and 8% ( left and right ). Reduce the latter one to move the text closer to the edge.
July 31, 2019 at 8:26 am #972263James
Amazing thanks. I’ve started to use the “inspect element” tool in Chrome to figure out bits of CSS for myself and I’ve come up against an issue:
Where do I put the
.page-idline in this bit of CSS apply only to certain pages?@media only screen and (min-width: 760px) .separate-containers .inside-article, .separate-containers .comments-area, .separate-containers .page-header, .separate-containers .paging-navigation, .one-container .site-content, .inside-page-header { padding: 119px;July 31, 2019 at 8:48 am #972283David
StaffCustomer SupportSo the
page-id-xxxxis a class attached to the body element and so isseparate-containers. So in this instance you can replace that latter with the page ID:.page-id-xxxx .inside-articleYou can also conjoin the two selectors with no gap between them, so this also valid ( although not required as the page-id-xxxx is unique):
.page-id-xxxx.separate-containers .inside-articleJuly 31, 2019 at 8:55 am #972293David
StaffCustomer SupportBTW regarding the DISALLOW_FILE_EDIT we do provide this PHP filter function here:
https://docs.generatepress.com/article/generate_hooks_execute_php/
This will allow PHP in hooks – when DISALLOW_FILE_EDIT is true.
-
AuthorPosts
- You must be logged in to reply to this topic.