display blog category name through blog category id in magento2 Unicorn Meta Zoo #1: Why another podcast? Announcing the arrival of Valued Associate #679: Cesar ManaraMagento2 coding style for files and folder namesMagento 2: Display list of specific categories on Home PageMagento 2: Display Custom attribute value under the product name on category pageMagento2: How to get total page number of category?Magento2 : How to get product type?Magento 2:Show category name in cart pagedisplay image in custom page in admin grid through image namethrough image name stored in database display image in custom tab in admin grid in magento2set custom attribute value according to product category in magento2Get child category name and image - Magento 2.3
Check if a string is entirely made of the same substring
Drawing a german abacus as in the books of Adam Ries
Why do real positive eigenvalues result in an unstable system? What about eigenvalues between 0 and 1? or 1?
Is there metaphorical meaning of "aus der Haft entlassen"?
What to do with someone that cheated their way through university and a PhD program?
How to find if a column is referenced in a computed column?
"My boss was furious with me and I have been fired" vs. "My boss was furious with me and I was fired"
What is the best way to deal with NPC-NPC combat?
Is it acceptable to use working hours to read general interest books?
Co-worker works way more than he should
Can a stored procedure reference the database in which it is stored?
Suing a Police Officer Instead of the Police Department
Complex numbers z=-3-4i polar form
The weakest link
Crossed out red box fitting tightly around image
How much cash can I safely carry into the USA and avoid civil forfeiture?
Scheduling based problem
Has a Nobel Peace laureate ever been accused of war crimes?
Why must Chinese maps be obfuscated?
Combinatorics problem, right solution?
I preordered a game on my Xbox while on the home screen of my friend's account. Which of us owns the game?
How to have a sharp product image?
Negative Resistance
How do I reattach a shelf to the wall when it ripped out of the wall?
display blog category name through blog category id in magento2
Unicorn Meta Zoo #1: Why another podcast?
Announcing the arrival of Valued Associate #679: Cesar ManaraMagento2 coding style for files and folder namesMagento 2: Display list of specific categories on Home PageMagento 2: Display Custom attribute value under the product name on category pageMagento2: How to get total page number of category?Magento2 : How to get product type?Magento 2:Show category name in cart pagedisplay image in custom page in admin grid through image namethrough image name stored in database display image in custom tab in admin grid in magento2set custom attribute value according to product category in magento2Get child category name and image - Magento 2.3
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I have a module for a blog in that I have different categories now I want print category name in phtml file through category id in magento2 I am getting category id
code to display category id
<?php
$categoryIds = $_post->getCategories();
print_r($categoryIds);
?>
through this code blog category id is coming now i want to display title
magento2
add a comment |
I have a module for a blog in that I have different categories now I want print category name in phtml file through category id in magento2 I am getting category id
code to display category id
<?php
$categoryIds = $_post->getCategories();
print_r($categoryIds);
?>
through this code blog category id is coming now i want to display title
magento2
which blog extension you are using?
– magefms
6 hours ago
can you post whole phtml code
– magefms
5 hours ago
add a comment |
I have a module for a blog in that I have different categories now I want print category name in phtml file through category id in magento2 I am getting category id
code to display category id
<?php
$categoryIds = $_post->getCategories();
print_r($categoryIds);
?>
through this code blog category id is coming now i want to display title
magento2
I have a module for a blog in that I have different categories now I want print category name in phtml file through category id in magento2 I am getting category id
code to display category id
<?php
$categoryIds = $_post->getCategories();
print_r($categoryIds);
?>
through this code blog category id is coming now i want to display title
magento2
magento2
asked 6 hours ago
Ashish RamchandaniAshish Ramchandani
39211
39211
which blog extension you are using?
– magefms
6 hours ago
can you post whole phtml code
– magefms
5 hours ago
add a comment |
which blog extension you are using?
– magefms
6 hours ago
can you post whole phtml code
– magefms
5 hours ago
which blog extension you are using?
– magefms
6 hours ago
which blog extension you are using?
– magefms
6 hours ago
can you post whole phtml code
– magefms
5 hours ago
can you post whole phtml code
– magefms
5 hours ago
add a comment |
1 Answer
1
active
oldest
votes
You can try this:
$title = $_post->getParentCategories()->getTitle();
echo $title;
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f272457%2fdisplay-blog-category-name-through-blog-category-id-in-magento2%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You can try this:
$title = $_post->getParentCategories()->getTitle();
echo $title;
add a comment |
You can try this:
$title = $_post->getParentCategories()->getTitle();
echo $title;
add a comment |
You can try this:
$title = $_post->getParentCategories()->getTitle();
echo $title;
You can try this:
$title = $_post->getParentCategories()->getTitle();
echo $title;
answered 5 hours ago
magefmsmagefms
2,8262529
2,8262529
add a comment |
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f272457%2fdisplay-blog-category-name-through-blog-category-id-in-magento2%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
which blog extension you are using?
– magefms
6 hours ago
can you post whole phtml code
– magefms
5 hours ago