I’ve been researching online and been trying to use exs_entry_meta( bool, bool, etc… ) to display author, date, categories, tags, comments which are controlled by bool(s).
The question I have is that when I apply this within modified child theme search.php or a category.php page exs_entry_meta() function outputs the bools I designated as ‘TRUE’ and null for the ones designated as ‘FALSE’ as it should.
However, when I attempted to use the same function, with essentially the same CPT structure and layout within a single_*.php page, nothing is output…
Things I’ve tried, non exhaustive list:
function custom_entry_meta( $get_the_author = true | false, $get_the_category_list = true | false, $get_the_date = true | false, $get_the_tag_list = true | false, $get_comments_number = true | false ){ echo $get_the_author = get_avatar( get_the_author_meta( ‘ID’ ), $size = ’63’ ); echo $get_the_category_list = get_the_category_list(‘, ‘); echo $get_the_date = get_the_date(); echo $get_the_tag_list = get_the_tag_list(”, ‘, ‘); echo $get_comments_number = get_comments_number();}
I apologize in advance for the poor formatting, I am not too familiar with this format of posing a question, and I am unable to locate the “code” snippet tool here.
Any guidance or direction on how to get this function to work within a single_*.php structure would be great, I surmise I may be missing something with the scope or declaration of variables somewhere?
]]>I would like to make the content of pages and posts (using page.php and single.php) to align left instead of center and thereby always match the top left position of content in the masonry grid. I’m messing around with the style.css without finding the solution…. I’m guessing I should remove/adjust some instance(s) of “margin-left: auto; margin-right: auto” in the .entry class?
Thankfully awaiting your answer!
]]>I have my posts grouped into 3 basic categories: Blog, Recipes, and Photo Galleries. I want the next/previous post links at the bottom of each post to only direct visitors to posts within the same category. You can see a good example of this at: https://test.garnergrows.com/baked-kale-chips/. The Next post link goes to another recipe, but the Previous post goes to a Blog entry which is less than desirable!
I have setup a staging copy of my site as well as a child theme for Dyad 2 so that I can safely edit php files, but I am unsure exactly where and how to edit. I (believe) I have found the code for these links in the “single.php” file. Other answers to the question have indicated that: ‘in_same_term’ must be set to “true”, but I am unsure exactly how and where to do this.
Any help would be appreciated. Thanks!
]]>I have installed the Meta Box plugin to create custom fields and custom post types. I need to display their fields in the front end, however they state to copy the single.php and rename as single-{post-type}.php in child theme. Problem is, I can’t find the single.php in the OWP theme directory. I’ve tried using hierarchy structure as stated in some of the theme files as partials/single/layout or partials/single/content, and placing my code in there, but this does nothing.
Where do I find single.php in the theme files, or how do I create my own custom post type .php file to overwrite this post type in my child theme?
Thank you
]]>And also I get the following message:
The “Blank” wrap type cannot be used for custom templates.
The current theme folder does not contain the “single.php” file or the file does not contain the classic loop (while (have_posts()) {…}).
Does anyone know what the problem could be?
]]>I have my theme installed on my new site and there are no problems at all. I installed the plugin Show Current Template and there is something off…
1. On my live new site using my theme with no errors, hovering over the Show Current Template admin bar link you can see every template being loaded including template-parts.
2. In my local dev for the site mentioned in #1 directly above, the sidebar and footer show but hovering over the Show Current TEmplate link does not list ANY templates at all.
3. In the local dev that have the content I pulled down with All in One, I see 2 different things for the Show Current Template link:
– 3a) no templates listed for pages that DO have a footer and sidebar
– 3b) template files listed for single.php that do NOT have a sidebar or footer loaded and those files are not listed???
Very confusing. I took some screenshots and loaded them into my media library of one of my sites since I don’t know how else to load an image: https://everyguitarchord.com/wp-content/uploads/2021/01/problem-with-single.php_.png
NOTE: That link is not the page I need help with!
Any thoughts on why this would happen? I suspect the issue is either:
1. My free theme OceanWP with all their styles and scripts
2. Elementor page builder
3. All the info that was pulled down with All In One Migration, and therefore maybe fully populated databases.
But for the local dev that has no issues, I forget how I did it but I pulled in dummy content from a .XML link and I guess I used the plugin WordPress Importer plugin. So that populated my databases. Why does my live site or local dev with live data data cause this problem? I don’t even know how to start looking for the issue.
]]>The website provided shows the instructions given by the developer.
My question is, can you tell me where I can find the mission news single.php file? Or is there an equivalent file location where I can run the do_shortcode command and accomplish the same goal?
Thank you
]]>