Tagged: meta, post meta, post-meta-infos
-
AuthorPosts
-
November 6, 2023 at 3:14 am #1424745
Hi there
In the Enfold “Blog Layout” (under Theme Options) you can choose to toggle on/off displaying things like “Blog Post Author“, “Blog Post Comment Count” etc.
I do not wish to display any of this, so I’ve toggled them off in the settings.
However, when turning all elements off, there are still 2 border lines visible at the bottom of the post page (above the social share elements). I’d like to remove this completely.
Using the browser “Inspect” tool, the CSS appears to be referenced at:
.html_elegant-blog #top .post-entry .post-meta-infos, .html_elegant-blog .avia-content-slider .slide-meta { display: block; text-align: center; padding: 10px 0; border-top-width: 1px; border-top-style: solid; border-bottom-width: 1px; border-bottom-style: solid; margin-top: 40px; width: 100%; clear: both; float: left; }
How can I remove this completely…..or at the very least for “.post-meta-infos“, which I believe is the one it applies to in this instance?
I’m assuming it’s bad form to simply delete this from the main CSS file, so what’s the best way (good coding practice) to do this?
November 6, 2023 at 3:38 am #1424748Hey adapt,
Thank you for the inquiry.
You can remove the post-meta-infos container from the enfold/includes/loop-index.php file starting from line 419 to 552.
line 421:
if( $blog_style !== 'bloglist-compact' )
line 552:
} // display meta-infos on all layouts except bloglist-compact
To override the original template file, you can create a copy of it in your child theme directory before doing the modification.
Best regards,
IsmaelNovember 6, 2023 at 4:15 am #1424749Thanks for the reply @Ismael, much appreciated. That worked!
Just to double check – when doing edits like this, should I emulate the folder structure as well?
For example, the child theme didn’t have an “includes” folder, so I created it.
Is this the best way to do it?
Also, final question. This is slightly unrelated, but also related.
Just under the part we just edited, are the social share buttons, which I left “activated” (ie on).
However, the header for this is “Share this entry“. I’d like to change this to “Share this article“.
Is there a simple way (in the browser Inspect function) to figure out which file the code comes from, to set this text?
Because if I know that, then I know the next steps. This is the same for a lot of sections that I may want to change update across the site – I can never know which file to look into to update – is it functions.php, or as above, loop-index.php etc etc.
November 6, 2023 at 8:56 am #1424767Hi,
For example, the child theme didn’t have an “includes” folder, so I created it.
Yes, that is the correct way to override a template file. The folder structure should be the same as the parent theme.
However, the header for this is “Share this entry“. I’d like to change this to “Share this article“.
To adjust the title of the sharing section, add this filter in the functions.php file.
add_filter('avia_social_share_title','avia_social_share_title_mod'); function avia_social_share_title_mod() { $output = 'Share this article:'; return $output; }
Is there a simple way (in the browser Inspect function) to figure out which file the code comes from, to set this text?
If you’re not familiar with the code base, one way to proceed is by performing a “search all” for a specific string or class name throughout the entire directory. This will provide you with a list of files in which the specific string or element is rendered. If you’re using an IDE such as VS Code, you can do the following steps.
// https://code.visualstudio.com/docs/editor/codebasics#_search-across-files
Other ways are to use the get_included_files function or use PHP debugging tools such as Xdebug.
// https://www.php.net/manual/en/function.get-included-files.php
// https://marketplace.visualstudio.com/items?itemName=xdebug.php-debugBest regards,
IsmaelNovember 6, 2023 at 8:48 pm #1424829November 7, 2023 at 3:09 am #1424847Hi adapt,
I’m glad that Ismael could help you :)
Thanks for using Enfold and have a great day!Best regards,
Nikko -
AuthorPosts
- The topic ‘Removing “post-meta-infos” completely’ is closed to new replies.