Archived topic
Problem I need solving with "Dispatch" theme
21 replies · Started by James on July 30, 2019
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?
Both - the duplicates will contain the original shortcodes from the home page and header element. So all duplicated shortcodes will need to be updated.
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?
Awesome :) 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.
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-id line 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;
So the page-id-xxxx is a class attached to the body element and so is separate-containers. So in this instance you can replace that latter with the page ID:
.page-id-xxxx .inside-article
You 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-article
BTW 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.