-
AuthorPosts
-
May 19, 2023 at 4:25 pm #1407959
Hi Nikko,
As per your advice i have created this new thread, from https://kriesi.at/support/topic/custom-post-type-and-single-php-template/
my problem is i have lots of custom post types created but none of the posts are opening, all showing default theme pages without any data of those posts.
If you open up the link below, you will understand what i mean to say, this is my staging site linkMay 20, 2023 at 12:24 am #1407997Hi NicomIT,
Thanks for posting a new thread.
I tried to login and check on the issue however I’m getting this error: Invalid login details.
Please check.Best regards,
NikkoMay 22, 2023 at 8:06 am #1408110Hi Nikko,
Sorry for the mistake, please follow the below given details
May 22, 2023 at 2:26 pm #1408139Hi NicomIT,
Thanks for giving us access.
I have modified this part of the code in single-branches.php (line 26):get_template_part( 'includes/loop', 'index' );
to:
get_template_part( 'includes/loop', 'branches' );
so it will fetch includes/loop-branches.php, and in loop-branches.php, I have added this code (starts with line 307):
/* * Get Values */ $address = get_post_meta( get_the_ID(), 'address', true ); /* * Add Values to Content */ $content_output .= "<h4>Address: {$address}</h4>";
There other values that I have added, you just need to fill in the rest and arrange the structure.
The first part of the code was just fetching the values from the metaboxes and the second part is adding it to the content.
Please review your site.Best regards,
NikkoMay 22, 2023 at 3:05 pm #1408148Hi Nikko,
Thanks for help and your effort, but i still have this issue because i want to implement this with the help of Avia layout builder so that look and feel of the site remains same. For this reason i created a page with custom template file and copy the full code of template-builder.php and named it as Branch Details, then created fucntions for each data with the help of add short code function and implemented those short codes in avia layout builder elements. If you click on this link https://www.maritimetravel.nicomitcms.com/our-locations/ and click on any branch title or branch details link you can find that each branch is opening with parameter ( as bid) attached, i m using that id to open each branch and to show its’s details. But this url is not seo friendly and so i want to show each branch details like i m showing right now but with url https://www.maritimetravel.nicomitcms.com/branches/prince-rupert/ like this.
If you help me in this i will very much grateful to you.
May 22, 2023 at 3:21 pm #1408154Hi NicomIT,
I think adding it to Advanced Layout Builder is a bit complex, the simplest workaround I could think is to create shortcodes that will output the values of those in the metaboxes.
I hope this puts you in the right direction.Best regards,
NikkoMay 23, 2023 at 8:32 am #1408226Hi Nicco,
Thanks for the update, I have worked with shortcodes but the problem is that I can’t make it in with ALB, i have short oces infunctions.php file and put the those in one of the page but I have to use the url like this https://www.maritimetravel.nicomitcms.com/branch-details-new/?bid=10, sending id as parameter to fetch that branch details, this url can’t be used for seo and secondly i can’t show branches details the way I want to show. If you can take some time to find a way to implement what I want that will be grateful.
https://www.maritimetravel.nicomitcms.com/branches/prince-rupert/ —> this is how you have shown details, thank you very much for this.
But i want to show above url details like this https://www.maritimetravel.nicomitcms.com/branch-details-new/?bid=10Please help me to solve my issue.
May 23, 2023 at 4:00 pm #1408279Hi NicomIT,
Is this page https://www.maritimetravel.nicomitcms.com/branch-details-new/?bid=10 generated by a plugin or a custom code?
Also https://www.maritimetravel.nicomitcms.com/branches/prince-rupert/ can become like https://www.maritimetravel.nicomitcms.com/branch-details-new/?bid=10 if necessary information can be fetched from the backend of the post type.Best regards,
NikkoMay 23, 2023 at 5:24 pm #1408310Hi Nicco,
https://www.maritimetravel.nicomitcms.com/branch-details-new/?bid=10
This page is custom generated, just created a template file copying the full code from template-builder.php file just named template as Branch details, then created a page admin selecting banch details as template then create short codes in functions.php file and put those short codes in alb text block elements.necessary info of the branches we are getting by id we are sending as paameter in the url
if you go through the code you will find what has been done
- This reply was modified 1 year, 7 months ago by NicomIT.
May 24, 2023 at 6:05 am #1408382Hi NicomIT,
I see, unfortunately, the complexity of what you need is beyond the scope of our support as stated in: https://kriesi.at/support/register/#av_section_2
I believe what you need to do instead is to create your own modified version of some of the elements in ALB, you can create it by following the directions in https://kriesi.at/documentation/enfold/intro-to-layout-builder/#add-elements-to-albBest regards,
NikkoJune 12, 2023 at 10:11 am #1410313Hi Support,
Is there anyone who can solve my above mentioned existing issue?
June 16, 2023 at 1:25 pm #1410925Hi NicomIT,
I think what you need is a bit complex and beyond the scope of our support, please consider hiring a freelance developer for the task or try reaching out to our partner, Codeable: https://kriesi.at/contact/customization
Best regards,
Nikko -
AuthorPosts
- You must be logged in to reply to this topic.