I added a like button to my index.php and single.php on yssencial.com (using wordpress)
but on the main page (index.php) it is not sharing the article but the site url (www.yssencial.com) instead.
You need to set the data-href property of the individual posts to your posts url. Otherwise it will use the page that it is actually on, eg your home page.
<div class="fb-like" data-href="http://www.yssencial.com/2011/09/20/terra-nova-quando-o-parque-jurassico-encontra-a-maquina-do-tempo/" data-send="false" data-layout="button_count" data-width="140" data-show-faces="true"></div>
Related
I'd like to set the Wordpress page https://hartmannventures.com/success-stories/ as landing page. It should keep the permalink as it is now (/success-stories). Furthermore, the "home" page https://hartmannventures.com/ should keep it's permalink like it is now (/). I tried to set it with the static page settings, but then the "Success Stories"-page turns into the home page (/).
Thanks for your help!
General Settings (I'm afraid of changing something of that)
Reading Settings (Static Page) (That's what didn't work -> Changed it back to Home again)
You need to create a separate template page inside them for that page, with that you no need worry about anything and it will not affect on the home page.
Template Format
<?php /* Template Name: Template name*/ ?>
<?php get_header();?>
HTML
<?php get_footer();?>
I have used the Structured Data Markup Helper and now need to add my mark-up code. Do I add this to the main head section of the website or just the individual page head.
I assume this needs to be added to the specific page head but I'm not sure where to access this. I am using Wordpress and normally add mark-up to the child theme header.php file in my cPanel but this is for all pages.
if(is_page('home')){ ?><!-- home page with slug home
enter your schema code for homepage -->
<?php }
else if(is_page('career')){ ?><!-- career page with slug career
enter your schema code for career-->
<?php }
I'm building a theme that would have essentially 2 pages, one would be a workshop, and the other would be an art page.
The main page for the domain has header(), footer() the content file is named front-page.php where I noticed that WordPress disregards the "Reading settings" of "Your homepage displays" ( Your latest posts / A static page )
I've created art-page.php to include new headers and footers for art (header('art'), footer('art'))
I followed the WordPress Codex of creating a new page, so art is a page I've published, seen that it's ID is 1742, I created the home page link to art as: <div id="art-link"></div>
Result:
When pressing on that link, it loads /the-art with a 200 response, including all the css and js for it, yet it loads the home page and under the footer of the home page it creates another home page with the header, then in the content a row with "art" (the name of the page) following by the main footer.
Expected result:
From the home page, click on the art link from above, wordpress will load art page (art-page.php) as a whole new page.
art-page.php
get_header('art');
?>
</div>
<h1>test art</h1>
<?php
get_footer('art');
?>
I'm a programmer with a basic grasp of the wordpress, yet struggling to create the expected result above.
Thanks,
Bud
I now study how to make a theme in wordpress.
First you need an Index.php file and a style.css file (these two files are the minimun)
You can cut the upper part of index.php and create the header.php an the down portion and create the footer.php.
You can have a static page as 1st page and the filename can be front-page.php and another page for blog.
BUT if you want to see a set of archives you use archive.php (post in same category, or of the same author e.t.c)
IF you want to see a post (one) you use the single.php or page.php for a single page.
In wordpres we have pages (static content like About us) and post this can written new info from author.
If you have difficulty, read a givem default theme, or use a starter theme and convert it to what you want.
Some starter themes to use are:
https://underscores.me/ (from authors of wp)
http://jointswp.com/ (Freamework foundation)
https://understrap.com/ (Bootstrap 4)
Before to start read about theme hierachy in wordpress
https://developer.wordpress.org/themes/basics/template-hierarchy/
example themes
https://medium.com/pixelperfecthtml/step-by-step-guide-to-convert-html-template-to-wordpress-theme-8d89264eb4be
https://www.elegantthemes.com/blog/tips-tricks/converting-html-sites-to-wordpress-sites
Working with SilverStripe I am trying to add search to my website. I have created my own theme, which I am using in my project. Now I am trying to add search in the blog.
In my Page.ss I have added this
<div class="search">
<h3>SEARCH HERE</h3>
$SearchForm
</div>
This code is for adding a search box in the website.
In the config I enable this
FulltextSearchable::enable();
The problem is that it is redirecting me to old theme search page instead of my own theme.
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) ?>