Hi i have this page template past conferences single and i have this href tag
<a href="/past-conferences-single/<?php the_slug(); ?>" class="wrapper" style="background-image:url('<?=$url?>')">
and my href link goes this way
past-conference-single/2013-inagural-diversity-abroad-conference-5/
i want that when i click on this page goes to this page template past-conference-single and with the content is dynamic based on the slug.
How will i able to do this?
Any help is muchly appreiciated. TIA
Related
From the tag page I click a post.
When I get to the post page I want to show the relevant tag (the one I clicked).
Problem is that each of my posts has more then one tag. and using get_the_tags() get me the whole list of tags related to the post.
How can I identify and show only the relevant tag from the array?
Is there anyway to pass this information to the single.php page?
at the end I passed the tag name with the post URL and used $_GET to read it back on the post page.
on tag page:
<a href="<?php the_permalink()?>?tagName=<?php single_tag_title(); ?>">
on post page:
<?php echo $_GET["tagName"]; ?>
I have this href link which is dynamically posted, I want to get the single.php file and the dynamically posts to be redirected to my single.php file Here is my link below:
<a href="/single-<?php the_ID();?>-<?php the_slug(); ?>" class="wrapper" style="background-image:url('<?=$url?>')">
When I click on the link the URL is this way:
/single-137-2014-inaugural-diversity-abroad-conference-4
And I want that page to be redirected to my single.php file. How will I be able to do this?
Any help is muchl appreciated. TIA
I have solved your problem but please read about the get_permalink() function
<a href="<?php echo get_permalink(); ?>" class="wrapper" style="background-image:url('<?=$url?>')">
get_permalink() - Retrieves full permalink (link of a post) for the current post or post ID. This link will be opened post single page, which means if this is a custom post type and you create it as a separate single-post-type.php, then it will be as an open single-post-type.php page. Otherwise it appears as single.php.
For your information, posts have been opened in single.page while page opened with page.php. read about this link https://codex.wordpress.org/Post_Type_Templates
I want to use a different header style for the home page than for inside pages of my site. Specifically, I want the header section to be less tall on the inside pages. Should I use a different header.php file for the home page? If so, how?
I'm having a hard time getting ideas using Google, so if anyone has a helpful link to the appropriate resource that'd be great.
WordPress has a home page boolean function is_front_page() (true if is front page otherwise false)
Add a class to the header/body/whatever parent so
<header class="header<?php if(is_front_page()){ ?> home_header<?php } ?>">
</header>
and simply reference the class in CSS.
WordPress codex reference
In Wordpress, is there an official way to link from a single post view to that post type's index view? I'm working with custom post types. I've googled around for a wordpress function but there doesn't seem to be one for this and I'd like to avoid hardcoding a URL.
Thanks!
<a href="<?php bloginfo('url'); ?>" > Home </a>
how i give permalinks to internal links of pages in wordpress
for example
web portal services 24/7 urgent support,
i want to display page name instead of page when user hover the internal link
I'm not sure that I understand your question, but you should first have a look here Permalinks in wordpress codex
If what you want is to simply display text on hover, the text that shows up on hover is in the html Title attribute. For example <a href="link" title="textonhover">
You can place this in the Title attribute to generate it: <?php echo get_the_title(ID) ?>